MCPcopy
hub / github.com/celery/celery / drain_events

Method drain_events

celery/backends/rpc.py:66–71  ·  view source on GitHub ↗
(self, timeout=None)

Source from the content-addressed store, hash-verified

64 self._consumer.consume()
65
66 def drain_events(self, timeout=None):
67 if self._connection:
68 with self.reconnect_on_error():
69 return self._connection.drain_events(timeout=timeout)
70 elif timeout:
71 time.sleep(timeout)
72
73 def _reconnect(self):
74 """Close the stale connection and rebuild the consumer.

Callers 3

loopMethod · 0.45
_quick_drainFunction · 0.45
_loop_cycleFunction · 0.45

Calls 2

reconnect_on_errorMethod · 0.80
sleepMethod · 0.45

Tested by

no test coverage detected