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

Add a configurable multiplication factor in Exponential delay #30

Conversation

PatrickLerner
Copy link
Contributor

This closes #23 and adds a new constructor to Exponential delays that allows specifying the factor of multiplication instead of using the base as the factor. In particular for retrying API responses it is desirable to use a lesser factor as otherwise the time to wait increases far too quickly to be useable.

I added two allows for deprecation because Rust recently deprecated some method (ref: rust-lang/rust#66919). Please advise if you would like to see this handled differently. I suppose for early rust version support they might still be required, so I did not want to remove them completely.

@PatrickLerner PatrickLerner force-pushed the add_first_in_millis_to_exponential branch from 70b37ca to 2c156fd Compare August 14, 2020 09:59
@jimmycuadra jimmycuadra merged commit 6c6da5d into jimmycuadra:master Aug 15, 2020
@jimmycuadra
Copy link
Owner

Thanks! Released in https://github.com/jimmycuadra/retry/releases/tag/1.1.0.

@PatrickLerner
Copy link
Contributor Author

Thank you @jimmycuadra! I appreciate it 👍

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 this pull request may close these issues.

Configurable multiplication factor in retry::delay::Exponential
2 participants