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

Method __init__

t/unit/worker/test_control.py:38–51  ·  view source on GitHub ↗
(self, app)

Source from the content-addressed store, hash-verified

36class Consumer(consumer.Consumer):
37
38 def __init__(self, app):
39 self.app = app
40 self.buffer = FastQueue()
41 self.timer = Timer()
42 self.event_dispatcher = Mock()
43 self.controller = WorkController()
44 self.task_consumer = Mock()
45 self.prefetch_multiplier = 1
46 self.initial_prefetch_count = 1
47
48 from celery.concurrency.base import BasePool
49 self.pool = BasePool(10)
50 self.task_buckets = defaultdict(lambda: None)
51 self.hub = None
52
53 def call_soon(self, p, *args, **kwargs):
54 return p(*args, **kwargs)

Callers

nothing calls this directly

Calls 3

TimerClass · 0.90
BasePoolClass · 0.90
WorkControllerClass · 0.70

Tested by

no test coverage detected