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

Side by Side Diff: appengine/chromium_try_flakes/endpoints_client/endpoints.py

Issue 2438673004: [Findit] Post analysis results of flakes to bug filed by chromium-try-flakes. (Closed)
Patch Set: Add a config flag to enable/disable updating monorail bug. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Provides functions to work with AppEngine endpoints""" 5 """Provides functions to work with AppEngine endpoints"""
6 6
7 import httplib2 7 import httplib2
8 import logging 8 import logging
9 import time 9 import time
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 try: 70 try:
71 return request.execute() 71 return request.execute()
72 except apiclient.errors.HttpError as e: 72 except apiclient.errors.HttpError as e:
73 # This retries internal server (500, 503) and quota (403) errors. 73 # This retries internal server (500, 503) and quota (403) errors.
74 # TODO(sergiyb): Figure out if we still need to retry 403 errors. They 74 # TODO(sergiyb): Figure out if we still need to retry 403 errors. They
75 # were used by codesite to fail on quota errors, but it is unclear whether 75 # were used by codesite to fail on quota errors, but it is unclear whether
76 # Monorail uses same logic or not. 76 # Monorail uses same logic or not.
77 if tries == num_tries or e.resp.status not in [403, 500, 503]: 77 if tries == num_tries or e.resp.status not in [403, 500, 503]:
78 raise 78 raise
79 time.sleep(2 ** (tries - 1)) 79 time.sleep(2 ** (tries - 1))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698