Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add starting power offset for the exponential backoff #79

Open
nashfive opened this issue Jan 16, 2023 · 1 comment · May be fixed by #86
Open

[Feature]: Add starting power offset for the exponential backoff #79

nashfive opened this issue Jan 16, 2023 · 1 comment · May be fixed by #86

Comments

@nashfive
Copy link

What problem are you facing?

Hi guys!
I've noticed that your implementation of the exponential backoff is returning a delay of : 0.5, 1, 2, 4s...

Would it be possible to have a way to provide a custom retry implementation along with the one that you provide? or, as a simpler change, add another parameter to let us decide the initial power parameter? For my use case, I'd need my retries to be performed after 2s, 4s and 8s.
So I was thinking about something like .exponential(base: 2, from: 1) or .exponential(base: 2, skip: 2) ..

What do you think ?

Other Information

No response

@malcommac
Copy link
Collaborator

I think it's a nice addition to customize the library; if you want to make a PR I'll be more than happy to look at it and integrate into the next release.

NicFontana pushed a commit to NicFontana/RealHTTP that referenced this issue Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants