catch RequestLimitExceeded exceptions and do several retries with sle…#12
Open
fsperling wants to merge 7 commits intoAnswers4AWS:masterfrom
Open
catch RequestLimitExceeded exceptions and do several retries with sle…#12fsperling wants to merge 7 commits intoAnswers4AWS:masterfrom
fsperling wants to merge 7 commits intoAnswers4AWS:masterfrom
Conversation
EricDHS
reviewed
Nov 8, 2016
backup_monkey/core.py
Outdated
| log.error("Encountered Error %s on volume %s", e.error_code, volume.id) | ||
| break | ||
| except boto.exception.BotoServerError, e: | ||
| log.error("Encountered Error %s on volume %s, waiting %d seconds then retrying", e.error_code, volume.id, attempt) |
There was a problem hiding this comment.
Here is snapshot related, snapshot id in log should be better.
EricDHS
reviewed
Nov 8, 2016
backup_monkey/core.py
Outdated
| volume.create_snapshot(description) | ||
| for attempt in range(5): | ||
| try: | ||
| volume.create_snapshot(description) |
There was a problem hiding this comment.
most of code and logic for snapshot and volume are same, I use a func wrapper to do it.
EricDHS
reviewed
Nov 8, 2016
| except boto.exception.BotoServerError, e: | ||
| log.error("Encountered Error %s on volume %s, waiting %d seconds then retrying", e.error_code, volume.id, attempt) | ||
| time.sleep(attempt) | ||
| break |
There was a problem hiding this comment.
After sleep, it should not break but continue.
EricDHS
reviewed
Nov 8, 2016
| break | ||
| else: | ||
| log.error("Encountered Error %s on volume %s, %d retries failed, continuing", e.error_code, volume.id, attempt) | ||
| continue |
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.
…eps inbetween