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

Function test_enqueue_job

tests/test_main.py:21–29  ·  view source on GitHub ↗
(arq_redis: ArqRedis, worker)

Source from the content-addressed store, hash-verified

19
20
21async def test_enqueue_job(arq_redis: ArqRedis, worker):
22 async def foobar(ctx):
23 return 42
24
25 j = await arq_redis.enqueue_job('foobar')
26 worker: Worker = worker(functions=[func(foobar, name='foobar')])
27 await worker.main()
28 r = await j.result(poll_delay=0)
29 assert r == 42 # 1
30
31
32async def test_enqueue_job_different_queues(arq_redis: ArqRedis, worker):

Callers

nothing calls this directly

Calls 5

funcFunction · 0.90
workerFunction · 0.85
enqueue_jobMethod · 0.80
mainMethod · 0.80
resultMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…