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

Function test_keep_result_ms

tests/test_worker.py:579–586  ·  view source on GitHub ↗
(arq_redis: ArqRedis, worker)

Source from the content-addressed store, hash-verified

577
578
579async def test_keep_result_ms(arq_redis: ArqRedis, worker):
580 async def return_something(ctx):
581 return 1
582
583 await arq_redis.enqueue_job('return_something')
584 worker: Worker = worker(functions=[func(return_something, name='return_something')], keep_result=3600.15)
585 await worker.main()
586 assert (worker.jobs_complete, worker.jobs_failed, worker.jobs_retried) == (1, 0, 0)
587
588
589async def test_return_exception(arq_redis: ArqRedis, worker):

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…