From 5b647d8e70c8a3ca4c52cba4f330da8271a54b8c Mon Sep 17 00:00:00 2001 From: Clint Armstrong Date: Wed, 2 Sep 2015 15:01:25 -0400 Subject: [PATCH] release queue if getting action lock fails --- poller-service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/poller-service.py b/poller-service.py index ccab47f489..9c17e0fe51 100755 --- a/poller-service.py +++ b/poller-service.py @@ -204,6 +204,8 @@ def getThreadQueueLock(device_id): return True else: thread_cursor.in_use = False + return False + log.debug("DEBUG: No threads avaliable") time.sleep(.5) @@ -217,6 +219,8 @@ def getThreadActionLock(device_id, action): return True else: thread_cursor.in_use = False + releaseLock('queue.{0}'.format(device_id), thread_cursor.cursor) + return False return False