-
Notifications
You must be signed in to change notification settings - Fork 146
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
Implemented simple image download retry #261
Conversation
@@ -1058,53 +1065,85 @@ def generateImageDump(config={}, other={}, images=[], start='', session=None): | |||
if not os.path.isdir(imagepath): | |||
print 'Creating "%s" directory' % (imagepath) | |||
os.makedirs(imagepath) | |||
|
|||
|
|||
maxseconds = 100 # max seconds to wait in a single sleeping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put this as something that the user can configure, or should we enforce this as a hard limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's currently a fixed value for the XML part as well.
I've only followed that. The number of retries is configurable though.
|
||
while not completed: | ||
if retried > 0 and retried < maxretries: | ||
wait = increment * retried < maxseconds and increment * \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Place the code in one line and the comments should precede the code.
Forgot github updates pull requests automatically. The later commits were not intended for the PR. |
I had a crash on this point before due to a server error, so I figured a simple retry would help.