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

Function test_remain_keys

tests/test_worker.py:517–525  ·  view source on GitHub ↗
(test_redis_settings: RedisSettings, arq_redis: ArqRedis, worker, create_pool)

Source from the content-addressed store, hash-verified

515
516
517async def test_remain_keys(test_redis_settings: RedisSettings, arq_redis: ArqRedis, worker, create_pool):
518 redis2 = await create_pool(test_redis_settings)
519 await arq_redis.enqueue_job('foobar', _job_id='testing')
520 assert sorted(await redis2.keys('*')) == [b'arq:job:testing', b'arq:queue']
521 worker: Worker = worker(functions=[foobar])
522 await worker.main()
523 assert sorted(await redis2.keys('*')) == [b'arq:queue:health-check', b'arq:result:testing']
524 await worker.close()
525 assert sorted(await redis2.keys('*')) == [b'arq:result:testing']
526
527
528async def test_remain_keys_no_results(arq_redis: ArqRedis, worker):

Callers

nothing calls this directly

Calls 5

create_poolFunction · 0.85
workerFunction · 0.85
enqueue_jobMethod · 0.80
mainMethod · 0.80
closeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…