Closed bennybp closed 9 months ago
Reviewing now! Thanks for this @bennybp!
retry looks kinda dead; looks like backoff may be a better bet for avoiding bitrot?
If adding another dependency seems overkill for this, it's not too hard to implement your own solution
Let me think about just hardcoding a solution. We are only using it in one place, so it it's not be too bad to implement it myself (using the aforementioned class attributes)
Ok implemented by hand now. It's pretty simple :)
There is only one other place I would consider adding this kind of logic (when dealing with certain database operations). But it will end up looking a lot different, so I'm not worried about duplicating code.
Giving this another review today!
Description
Requests that result in certain errors due to spurious connection/networking issues should now be automatically retried.
The types of exceptions handled should cover most cases, but I am open to expanding the list if people find ones that I missed.
The request will be tried again after waiting 0.5, 1.0, 2.0, and 4.0 seconds (since the previous request)
Seem reasonable @dotsdl? Closes #741
Changelog description
Requests now will be automatically retried in case of connection or networking issues
Status