MCPcopy
hub / github.com/celery/celery / create

Method create

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

Source from the content-addressed store, hash-verified

33 """Timer bootstep."""
34
35 def create(self, w):
36 if w.use_eventloop:
37 # does not use dedicated timer thread.
38 w.timer = _Timer(max_interval=10.0)
39 else:
40 if not w.timer_cls:
41 # Default Timer is set by the pool, as for example, the
42 # eventlet pool needs a custom timer implementation.
43 w.timer_cls = w.pool_cls.Timer
44 w.timer = self.instantiate(w.timer_cls,
45 max_interval=w.timer_precision,
46 on_error=self.on_timer_error,
47 on_tick=self.on_timer_tick)
48
49 def on_timer_error(self, exc):
50 logger.error('Timer error: %r', exc, exc_info=True)

Callers

nothing calls this directly

Calls 1

instantiateMethod · 0.80

Tested by

no test coverage detected