Increase gerrit_util retry count and delay.

Bug: 881860
Change-Id: I6402ff2665b70b46558799dbb16ac9c7a9d7d640
Reviewed-on: https://chromium-review.googlesource.com/1224990
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
changes/90/1224990/2
Steve Kobes 7 years ago committed by Commit Bot
parent dfce68bcdd
commit 5611772056

@ -32,9 +32,10 @@ import subprocess2
from third_party import httplib2
LOGGER = logging.getLogger()
# With a starting sleep time of 1 second, 2^n exponential backoff, and six
# total tries, the sleep time between the first and last tries will be 31s.
TRY_LIMIT = 6
# With a starting sleep time of 1.5 seconds, 2^n exponential backoff, and seven
# total tries, the sleep time between the first and last tries will be 94.5 sec.
# TODO(crbug.com/881860): Lower this when crbug.com/877717 is fixed.
TRY_LIMIT = 7
# Controls the transport protocol used to communicate with gerrit.
@ -379,7 +380,7 @@ def ReadHttpResponse(conn, accept_statuses=frozenset([200])):
Common additions include 204, 400, and 404.
Returns: A string buffer containing the connection's reply.
"""
sleep_time = 1
sleep_time = 1.5
for idx in range(TRY_LIMIT):
response, contents = conn.request(**conn.req_params)

Loading…
Cancel
Save