MCPcopy Create free account
hub / github.com/python-arq/arq / worker

Function worker

tests/conftest.py:94–107  ·  view source on GitHub ↗
(arq_redis)

Source from the content-addressed store, hash-verified

92
93@pytest.fixture
94async def worker(arq_redis):
95 worker_: Worker = None
96
97 def create(functions=[], burst=True, poll_delay=0, max_jobs=10, arq_redis=arq_redis, **kwargs):
98 nonlocal worker_
99 worker_ = Worker(
100 functions=functions, redis_pool=arq_redis, burst=burst, poll_delay=poll_delay, max_jobs=max_jobs, **kwargs
101 )
102 return worker_
103
104 yield create
105
106 if worker_:
107 await worker_.close()
108
109
110@pytest.fixture

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…