Merge "set poll switch lock timeout to 120 seconds" into dev/experimental

This commit is contained in:
Jenkins 2014-09-07 19:49:08 +00:00 committed by Gerrit Code Review
commit 128138ab00
2 changed files with 4 additions and 1 deletions

3
.gitignore vendored
View File

@ -6,6 +6,9 @@
# C extensions
*.so
# log extensions
*.log
# Packages
*.egg
*.egg-info

View File

@ -120,7 +120,7 @@ def poll_switch(
"""
poller = user_api.get_user_object(poller_email)
ip_int = long(netaddr.IPAddress(ip_addr))
with util.lock('poll switch %s' % ip_addr) as lock:
with util.lock('poll switch %s' % ip_addr, timeout=120) as lock:
if not lock:
raise Exception(
'failed to acquire lock to poll switch %s' % ip_addr