From 5263865e31da89d4b6786f55913599733d352784 Mon Sep 17 00:00:00 2001 From: xiaodongwang Date: Sun, 7 Sep 2014 11:19:48 -0700 Subject: [PATCH] set poll switch lock timeout to 120 seconds Change-Id: I045dbd3a6593d0523ddbb0fd335949faaffdf028 --- .gitignore | 3 +++ compass/actions/poll_switch.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2d37d5c7..a3f660a2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ # C extensions *.so +# log extensions +*.log + # Packages *.egg *.egg-info diff --git a/compass/actions/poll_switch.py b/compass/actions/poll_switch.py index e4094544..639cd7d5 100644 --- a/compass/actions/poll_switch.py +++ b/compass/actions/poll_switch.py @@ -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