Fixes race condition in Redis transport. Closes celery/celery#940. Closes celery/celery#938. Closes celery/celery#935

This commit is contained in:
Ask Solem 2012-08-24 12:52:14 +01:00
parent 31d7869842
commit a12cef3523
1 changed files with 3 additions and 2 deletions

View File

@ -111,7 +111,7 @@ class QoS(virtual.QoS):
M, EX, RK = loads(p) M, EX, RK = loads(p)
self.channel._do_restore_message(M, EX, RK) self.channel._do_restore_message(M, EX, RK)
@cached_property @property
def client(self): def client(self):
return self.channel._avail_client return self.channel._avail_client
@ -206,7 +206,8 @@ class MultiChannelPoller(object):
def on_poll_empty(self): def on_poll_empty(self):
for channel in self._channels: for channel in self._channels:
if channel.active_queues: 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): def handle_event(self, fileno, event):
if event & READ: if event & READ: