MCPcopy
hub / github.com/celery/celery / Consumer

Class Consumer

t/unit/worker/test_control.py:35–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35class Consumer(consumer.Consumer):
36
37 def __init__(self, app):
38 self.app = app
39 self.buffer = FastQueue()
40 self.timer = Timer()
41 self.event_dispatcher = Mock()
42 self.controller = WorkController()
43 self.task_consumer = Mock()
44 self.prefetch_multiplier = 1
45 self.initial_prefetch_count = 1
46
47 from celery.concurrency.base import BasePool
48 self.pool = BasePool(10)
49 self.task_buckets = defaultdict(lambda: None)
50 self.hub = None
51
52 def call_soon(self, p, *args, **kwargs):
53 return p(*args, **kwargs)
54
55
56class 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
test_pool_growMethod · 0.70
test_dump_scheduleMethod · 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
test_pool_growMethod · 0.56
test_dump_scheduleMethod · 0.56