-
Notifications
You must be signed in to change notification settings - Fork 21
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
Change request timeout and retry values on the fly #97
Comments
How would we want this to work, having attributes on the class?
Something like that? |
Why not simply add them as keyword arguments for PyPump ? |
PyPump's initialisation kwargs got very crowded before, I am trying to limit how much can be passed to PyPump's initialisation to try and make it more readable and less overbearing. |
Class attributes are probably the way to go. Couldn't we have the timeout being set on the client? (though |
Ah yes setting them in some initialise might be useful as some requests are done on the initialisation. I'm not sure they belong on the client though as the client uses pypump to make the requests |
This can now be achevied either by changing the .timeout or .retries variable or passing your own in to the PyPump object.
Somewhat confusingly and this might need to be brought up in a followup issue retries=1 actually only makes 1 attempt and retries=0 never makes a request. This is because retires is actually how many requests are attempted rather than how many follow up requests are attempted when the initial request fails. |
The fix for #96 has left us in the position where we need to subclass PyPump to change the request timeout and retry values. That is quite silly.
The text was updated successfully, but these errors were encountered: