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

Unified Diff: git_cache.py

Issue 1785083005: Set default --lock_timeout to 5m (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: updated comment Created 4 years, 9 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 | « gclient.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cache.py
diff --git a/git_cache.py b/git_cache.py
index 9137ef5f58e27cc95a0e0a701693d61af364cba4..753ccde34a46c70c24c9748827311ff0138dbc0e 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -93,7 +93,6 @@ class Lockfile(object):
"""Acquire the lock.
This will block with a deadline of self.timeout seconds.
- If self.timeout is zero, this is a NON-BLOCKING FAIL-FAST operation.
"""
elapsed = 0
while True:
@@ -102,7 +101,7 @@ class Lockfile(object):
return
except OSError as e:
if elapsed < self.timeout:
- sleep_time = min(3, self.timeout - elapsed)
+ sleep_time = max(10, min(3, self.timeout - elapsed))
logging.info('Could not create git cache lockfile; '
'will retry after sleep(%d).', sleep_time);
elapsed += sleep_time
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698