Use longer server start timeout by default#40
Merged
mlackman merged 2 commits intoUpCloudLtd:masterfrom Jan 31, 2018
scop:start-timeout
Merged
Use longer server start timeout by default#40mlackman merged 2 commits intoUpCloudLtd:masterfrom scop:start-timeout
mlackman merged 2 commits intoUpCloudLtd:masterfrom
scop:start-timeout
Conversation
Leave as default (-1) to fall back to timeout set in base api instance. Set to None to disable timing out altogether.
The 10 second CloudManager default is not quite sufficient here.
mlackman
reviewed
Jan 31, 2018
| self.timeout = timeout | ||
|
|
||
| def request(self, method, endpoint, body=None): | ||
| def request(self, method, endpoint, body=None, timeout=-1): |
Contributor
There was a problem hiding this comment.
I would prefer timeout to be None
Member
Author
There was a problem hiding this comment.
The point for the default not to be None is that one can then call the method with timeout=None to disable the timeout altogether. (See complete commit message of the first commit.) That's consistent with how one can disable timeouts for the whole manager.
Contributor
There was a problem hiding this comment.
ok, works for me :D, merging
| else: | ||
| json_body_or_None = None | ||
|
|
||
| call_timeout = timeout if timeout != -1 else self.timeout |
Contributor
There was a problem hiding this comment.
When timeout is None, this could be stated as: call_timeout = timeout or self.timeout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.