MCPcopy
hub / github.com/celery/celery / MockPool

Class MockPool

t/unit/worker/test_control.py:337–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335 def test_pool_grow(self):
336
337 class MockPool:
338
339 def __init__(self, size=1):
340 self.size = size
341
342 def grow(self, n=1):
343 self.size += n
344
345 def shrink(self, n=1):
346 self.size -= n
347
348 @property
349 def num_processes(self):
350 return self.size
351
352 consumer = Consumer(self.app)
353 consumer.prefetch_multiplier = 8

Callers 1

test_pool_growMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_pool_growMethod · 0.56