-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Refactor 'gcloud.streaming.http_wrapper' exception handling #1249
Refactor 'gcloud.streaming.http_wrapper' exception handling #1249
Conversation
- Catch only explicitly retryable exceptions, and handle retry count / interval explicitly in 'make_api_request'. - Delete the 'handle_heep_exceptions' helper, and the 'retry_func' argument which used it as a default. - Rename '_rebuild_http_connections' -> '_reset_http_connections' for clarity. Closes #1223.
Happy to see this! I had to peek into this mess a bit for #1248. If they collide for merging, let's stick with this one first. |
@@ -399,11 +345,23 @@ def _make_api_request_no_retry(http, http_request, redirections=5, | |||
return response | |||
|
|||
|
|||
_RETRYABLE_EXCEPTIONS = ( |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Wow this was so much less work than I expected. w00t |
LGTM |
OK. The new commit since I reviewed is due to the |
…on_handling Refactor 'gcloud.streaming.http_wrapper' exception handling
Yes: it provoked an |
OK Good deal. Thanks. |
make_api_request
.handle_heep_exceptions
helper, and theretry_func
argument which used it as a default._rebuild_http_connections
->_reset_http_connections
for clarity.Closes #1223.