arq
arq copied to clipboard
Fix recursion while waiting for redis connection
Arq has ability to retry connections to redis in case of problems.
That is a nice feature, but it crashes after hundreds of attempts
reaching maximal recursion depth. This change modifies re-try algorithm
from recursion to iteration avoiding the limit.
In practice it would be nice to have ability to wait forever as issue with redis instance should not kill worker process, but that is a separate change that can be built on top.
Fixes exception when retrying redis connection many times: RecursionError: maximum recursion depth exceeded while getting the str of an object
Codecov Report
Merging #311 (3ff25ad) into main (b4b40ad) will increase coverage by
0.10%. The diff coverage is100.00%.
:exclamation: Current head 3ff25ad differs from pull request most recent head 2eab750. Consider uploading reports for the commit 2eab750 to get more accurate results
@@ Coverage Diff @@
## main #311 +/- ##
==========================================
+ Coverage 98.77% 98.87% +0.10%
==========================================
Files 11 11
Lines 980 981 +1
Branches 183 183
==========================================
+ Hits 968 970 +2
Misses 6 6
+ Partials 6 5 -1
| Impacted Files | Coverage Δ | |
|---|---|---|
| arq/connections.py | 95.55% <100.00%> (+0.03%) |
:arrow_up: |
| arq/worker.py | 99.55% <0.00%> (+0.22%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update b4b40ad...2eab750. Read the comment docs.
Hi, all the failures in CI feels unrelated, should I do something more to get this PR merged?
3.9 failure looks intermittent, might be worth rerunning.
If you can fix the problem with click that would be great, otherwise I will.
3.9 failure looks intermittent, might be worth rerunning.
I have no means of re-running other then changing something and re-pushing. I guess it is related to some permissions.
If you can fix the problem with click that would be great, otherwise I will.
https://github.com/samuelcolvin/arq/pull/312
Thanks so much.
By the way, you can always re-run CI using git commit -m bump --allow-empty.