(arq_redis: ArqRedis, worker)
| 189 | |
| 190 | |
| 191 | async def test_custom_try(arq_redis: ArqRedis, worker): |
| 192 | async def foobar(ctx): |
| 193 | return ctx['job_try'] |
| 194 | |
| 195 | j1 = await arq_redis.enqueue_job('foobar') |
| 196 | w: Worker = worker(functions=[func(foobar, name='foobar')]) |
| 197 | await w.main() |
| 198 | r = await j1.result(poll_delay=0) |
| 199 | assert r == 1 |
| 200 | |
| 201 | j2 = await arq_redis.enqueue_job('foobar', _job_try=3) |
| 202 | await w.main() |
| 203 | r = await j2.result(poll_delay=0) |
| 204 | assert r == 3 |
| 205 | |
| 206 | |
| 207 | async def test_custom_try2(arq_redis: ArqRedis, worker): |
nothing calls this directly
no test coverage detected
searching dependent graphs…