Conversation
hannes-ucsc
reviewed
Mar 5, 2019
Contributor
hannes-ucsc
left a comment
There was a problem hiding this comment.
Can't say yay/nay until tests are passing.
| logger.warning("Retrying: {}".format(retry.history[-1])) | ||
| return retry | ||
| _retry = super(RetryPolicy, self).increment(*args, **kwargs) | ||
| last_resp = retry.history[-1] |
Contributor
There was a problem hiding this comment.
Can retry.history be empty?
Collaborator
Author
There was a problem hiding this comment.
not at this point in the code because super(RetryPolicy, self).increment(*args, **kwargs) appends the last request to history.
| _retry = super(RetryPolicy, self).increment(*args, **kwargs) | ||
| last_resp = retry.history[-1] | ||
| if last_resp.status in {301}: | ||
| logger.info("Retrying: {}".format(last_resp)) |
Contributor
There was a problem hiding this comment.
Might want to reduce the duplication between those two lines.
Codecov Report
@@ Coverage Diff @@
## master #257 +/- ##
==========================================
- Coverage 83.73% 83.28% -0.46%
==========================================
Files 37 37
Lines 1611 1615 +4
==========================================
- Hits 1349 1345 -4
- Misses 262 270 +8
Continue to review full report at Codecov.
|
hannes-ucsc
approved these changes
Mar 5, 2019
Co-Authored-By: Bento007 <1429913+Bento007@users.noreply.github.com>
maniarathi
pushed a commit
that referenced
this pull request
Mar 28, 2019
* 301 retries are logged as info * addressing comments * Update hca/util/__init__.py Co-Authored-By: Bento007 <1429913+Bento007@users.noreply.github.com>
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.
Fixes #256