Chromium Code Reviews| Index: rietveld.py |
| diff --git a/rietveld.py b/rietveld.py |
| index d78c0171d468f789ca5be44b3aea1434cd4dbed8..2458565d40fc59b935a8428d78d284123921d8df 100644 |
| --- a/rietveld.py |
| +++ b/rietveld.py |
| @@ -409,7 +409,7 @@ class Rietveld(object): |
| old_error_exit(msg) |
| upload.ErrorExit = trap_http_500 |
| - maxtries = 5 |
| + maxtries = 10 |
| for retry in xrange(maxtries): |
| try: |
| logging.debug('%s' % request_path) |
| @@ -434,8 +434,8 @@ class Rietveld(object): |
| raise |
| if not 'timed out' in str(e): |
| raise |
| - # If reaching this line, loop again. Uses a small backoff. |
| - time.sleep(1+maxtries*2) |
| + # If reaching this line, loop again. Uses an exponential backoff. |
| + time.sleep(1+retry) |
|
Sergey Berezin
2014/06/12 17:54:17
nit: Technically, this is a linear backoff now. Fi
Sergiy Byelozyorov
2014/06/13 09:39:42
Done.
|
| finally: |
| upload.ErrorExit = old_error_exit |