channable / opnieuw

One weird trick to make your code more reliable
https://tech.channable.com/posts/2020-02-05-opnieuw.html
BSD 3-Clause "New" or "Revised" License
289 stars 11 forks source link

Introduce ``BackoffCalculator`` #24

Closed DanielNoord closed 1 year ago

DanielNoord commented 1 year ago

This replaces the RetryState for a much simpler state object that exposes a simple method to get the next period to wait.

I believe this makes the code a lot easier to follow: WaitState is responsible for all time calculations and the retry decorators are responsible for handling the returned time periods. Next step would be to start chaining exceptions.

DanielNoord commented 1 year ago

@OpsBotPrime merge on friday

OpsBotPrime commented 1 year ago

Pull request approved for merge by @DanielNoord, rebasing now.

OpsBotPrime commented 1 year ago

Rebased as 85558c90c0cd51c97da12de9bcb4a01511a61179, waiting for CI …

OpsBotPrime commented 1 year ago

CI job :yellow_circle: started.