From a12cef3523dbedc86bbae4b5e31be2dafe4501b8 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Fri, 24 Aug 2012 12:52:14 +0100 Subject: [PATCH] Fixes race condition in Redis transport. Closes celery/celery#940. Closes celery/celery#938. Closes celery/celery#935 --- kombu/transport/redis.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kombu/transport/redis.py b/kombu/transport/redis.py index 39c8b4ca..5b826bfe 100644 --- a/kombu/transport/redis.py +++ b/kombu/transport/redis.py @@ -111,7 +111,7 @@ class QoS(virtual.QoS): M, EX, RK = loads(p) self.channel._do_restore_message(M, EX, RK) - @cached_property + @property def client(self): return self.channel._avail_client @@ -206,7 +206,8 @@ class MultiChannelPoller(object): def on_poll_empty(self): for channel in self._channels: if channel.active_queues: - channel.qos.restore_visible() + # only need to do this once, as they are not local to channel. + return channel.qos.restore_visible() def handle_event(self, fileno, event): if event & READ: