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

Class Consumer

t/unit/worker/test_control.py:36–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35
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)
55
56
57class test_Pidbox:

Callers 15

setup_methodMethod · 0.70
test_enable_eventsMethod · 0.70
test_disable_eventsMethod · 0.70
test_clockMethod · 0.70
test_helloMethod · 0.70
test_confMethod · 0.70
test_electionMethod · 0.70
test_heartbeatMethod · 0.70

Calls

no outgoing calls

Tested by 15

setup_methodMethod · 0.56
test_enable_eventsMethod · 0.56
test_disable_eventsMethod · 0.56
test_clockMethod · 0.56
test_helloMethod · 0.56
test_confMethod · 0.56
test_electionMethod · 0.56
test_heartbeatMethod · 0.56