Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: run_isolated.py

Issue 14455006: Do not retry uploading to blobstore on HTTP 500, regenerate a new url first. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: address comment Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « isolateserver_archive.py ('k') | tests/isolateserver_archive_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: run_isolated.py
diff --git a/run_isolated.py b/run_isolated.py
index 274ac3d65f423d645b350a48935c66a5c444adb1..b8ecc4af89e0a674b19b315eb720ffbabdb72d51 100755
--- a/run_isolated.py
+++ b/run_isolated.py
@@ -536,7 +536,7 @@ class HttpService(object):
return self._retry_loop(make_request, **kwargs)
- def _retry_loop(self, make_request, retry_404=False):
+ def _retry_loop(self, make_request, retry_404=False, retry_50x=True):
"""Runs internal request-retry loop."""
authenticated = False
last_error = None
@@ -564,7 +564,8 @@ class HttpService(object):
request.get_full_url(), self._format_exception(e, verbose=True))
return None
- if e.code < 500 and not (retry_404 and e.code == 404):
+ if ((e.code < 500 and not (retry_404 and e.code == 404)) or
+ (e.code >= 500 and not retry_50x)):
# This HTTPError means we reached the server and there was a problem
# with the request, so don't retry.
logging.error(
« no previous file with comments | « isolateserver_archive.py ('k') | tests/isolateserver_archive_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698