MCPcopy
hub / github.com/celery/celery / start

Method start

celery/worker/consumer/events.py:34–49  ·  view source on GitHub ↗
(self, c)

Source from the content-addressed store, hash-verified

32 super().__init__(c, **kwargs)
33
34 def start(self, c):
35 # flush events sent while connection was down.
36 prev = self._close(c)
37 dis = c.event_dispatcher = c.app.events.Dispatcher(
38 c.connection_for_write(),
39 hostname=c.hostname,
40 enabled=self.send_events,
41 groups=self.groups,
42 # we currently only buffer events when the event loop is enabled
43 # XXX This excludes eventlet/gevent, which should actually buffer.
44 buffer_group=['task'] if c.hub else None,
45 on_send_buffered=c.on_send_event_buffered if c.hub else None,
46 )
47 if prev:
48 dis.extend_buffer(prev)
49 dis.flush()
50
51 def stop(self, c):
52 pass

Callers

nothing calls this directly

Calls 5

_closeMethod · 0.95
DispatcherMethod · 0.80
extend_bufferMethod · 0.80
connection_for_writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected