Commit 56117720 authored by Steve Kobes's avatar Steve Kobes Committed by Commit Bot

Increase gerrit_util retry count and delay.

Bug: 881860
Change-Id: I6402ff2665b70b46558799dbb16ac9c7a9d7d640
Reviewed-on: https://chromium-review.googlesource.com/1224990Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
parent dfce68bc
...@@ -32,9 +32,10 @@ import subprocess2 ...@@ -32,9 +32,10 @@ import subprocess2
from third_party import httplib2 from third_party import httplib2
LOGGER = logging.getLogger() LOGGER = logging.getLogger()
# With a starting sleep time of 1 second, 2^n exponential backoff, and six # 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 31s. # total tries, the sleep time between the first and last tries will be 94.5 sec.
TRY_LIMIT = 6 # TODO(crbug.com/881860): Lower this when crbug.com/877717 is fixed.
TRY_LIMIT = 7
# Controls the transport protocol used to communicate with gerrit. # Controls the transport protocol used to communicate with gerrit.
...@@ -379,7 +380,7 @@ def ReadHttpResponse(conn, accept_statuses=frozenset([200])): ...@@ -379,7 +380,7 @@ def ReadHttpResponse(conn, accept_statuses=frozenset([200])):
Common additions include 204, 400, and 404. Common additions include 204, 400, and 404.
Returns: A string buffer containing the connection's reply. Returns: A string buffer containing the connection's reply.
""" """
sleep_time = 1 sleep_time = 1.5
for idx in range(TRY_LIMIT): for idx in range(TRY_LIMIT):
response, contents = conn.request(**conn.req_params) response, contents = conn.request(**conn.req_params)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment