MCPcopy Create free account
hub / github.com/celery/celery / create

Method create

celery/worker/components.py:68–75  ·  view source on GitHub ↗
(self, w)

Source from the content-addressed store, hash-verified

66 return w.use_eventloop
67
68 def create(self, w):
69 w.hub = get_event_loop()
70 if w.hub is None:
71 required_hub = getattr(w._conninfo, 'requires_hub', None)
72 w.hub = set_event_loop((
73 required_hub if required_hub else _Hub)(w.timer))
74 self._patch_thread_primitives(w)
75 return self
76
77 def start(self, w):
78 # Ensure the kombu hub's poller is initialized before the event loop starts.

Callers 3

test_Hub_createMethod · 0.95
setMethod · 0.45
_get_connectionMethod · 0.45

Calls 1

Tested by 1

test_Hub_createMethod · 0.76