set poll switch lock timeout to 120 seconds
Change-Id: I045dbd3a6593d0523ddbb0fd335949faaffdf028
This commit is contained in:
parent
ab0aef1c3e
commit
5263865e31
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,6 +6,9 @@
|
|||||||
# C extensions
|
# C extensions
|
||||||
*.so
|
*.so
|
||||||
|
|
||||||
|
# log extensions
|
||||||
|
*.log
|
||||||
|
|
||||||
# Packages
|
# Packages
|
||||||
*.egg
|
*.egg
|
||||||
*.egg-info
|
*.egg-info
|
||||||
|
@ -120,7 +120,7 @@ def poll_switch(
|
|||||||
"""
|
"""
|
||||||
poller = user_api.get_user_object(poller_email)
|
poller = user_api.get_user_object(poller_email)
|
||||||
ip_int = long(netaddr.IPAddress(ip_addr))
|
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:
|
if not lock:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
'failed to acquire lock to poll switch %s' % ip_addr
|
'failed to acquire lock to poll switch %s' % ip_addr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user