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

Generator functions bail on retry-able exceptions #81

Open
jjinno opened this issue May 20, 2019 · 1 comment
Open

Generator functions bail on retry-able exceptions #81

jjinno opened this issue May 20, 2019 · 1 comment

Comments

@jjinno
Copy link

jjinno commented May 20, 2019

For tracking purposes.

The original v1 version of Requester included an additive backoff/retry loop for execute_request(). This logic does not appear to have been ported to the v2 Requester class. Unfortunately, HTTPError(429) and URLError(Timeout) both can raise exceptions that will interrupt an iteration in progress. Because we want to allow uninterrupted iteration over things like Incident.list(), any applicable retries should occur before raising these exceptions.

This retry logic is especially pertinent for multi-threading, as (for example) a parent thread may iterate over incidents, while child threads iterate over log_entries. There should be an expectation that rapid requests from the child, causing HTTP 429, should not raise an exception in the parent thread iterator as it does today.

@jjinno
Copy link
Author

jjinno commented May 21, 2019

PR #83 (fyi)

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

No branches or pull requests

1 participant