8000 introduce Http retry strategy by jupe · Pull Request #16 · jupe/py-lockable · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

introduce Http retry strategy #16

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

Merged
merged 22 commits into from
Aug 19, 2021
Merged

introduce Http retry strategy #16

merged 22 commits into from
Aug 19, 2021

Conversation

jupe
Copy link
Owner
@jupe jupe commented Aug 15, 2021

this PR introduce retry logic if uri that provides resources.json fails. Rules for retry are:

  • total=5 attempts,
  • follow redirect 5 times
  • rely in following statuses:
     429,  # Too Many Requests
     500,  # Internal Server Error
     502,  # Bad Gateway server error
     503,  # Service Unavailable
     504  # Gateway Timeout server error
    
  • backoff_factor=0.5

@jupe jupe mentioned this pull request Aug 15, 2021
1 task
jupe added 2 commits August 16, 2021 07:27
* retry 5 times (0.5s, 1s, 2s, 4s, 8s)
* allow redirect
* use default method_whitelist (was obsoleted name)
* use backoff_factor
@jupe jupe requested a review from juhhov August 16, 2021 18:19
@juhhov
Copy link
Collaborator
juhhov commented Aug 17, 2021

Missing tests, otherwise looks good.

@jupe jupe marked this pull request as ready for review August 17, 2021 19:45
@jupe
Copy link
Owner Author
jupe commented Aug 17, 2021

There might be some cases still that is not retries even should be.. But at least basic scenarios should now work.

@juhhov juhhov merged commit 23bfc4a into master Aug 19, 2021
@juhhov juhhov deleted the http_retry branch August 19, 2021 07:55
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
0