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 max_time keyword argument #48

Merged
merged 2 commits into from
Mar 30, 2018
Merged

Add max_time keyword argument #48

merged 2 commits into from
Mar 30, 2018

Conversation

bgreen-litl
Copy link
Member

This addresses #43

The core issue is that with full_jitter, max_tries is no longer a
reliable way to control the total retry time. This adds a similar
max_time keyword argument which triggers a giveup after a total
elapsed amount of time rather than a set number of retries.

Further, since full_jitter is actually the default behavior, you
probably generally want to use max_time rather than max_tries so
this updates the examples in the README to show that.

@coveralls
Copy link

coveralls commented Mar 7, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 9903416 on max-time into 34a716e on master.

Bob Green added 2 commits March 30, 2018 07:50
This addresses #43

The core issue is that with `full_jitter`, `max_tries` is no longer a
reliable way to control the total retry time. This adds a similar
`max_time` keyword argument which triggers a giveup after a total
elapsed amount of time rather than a set number of retries.

Further, since full_jitter is actually the default behavior, you
probably generally want to use `max_time` rather than `max_tries` so
this updates the examples in the README to show that.
Python 2.6's timedelta doesn't have total_seconds() so we implement
our own here.

It keeps being just easy enough to keep python 2.6 support...
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.

2 participants