release queue if getting action lock fails

This commit is contained in:
Clint Armstrong
2015-09-02 15:01:25 -04:00
parent b7ecea9323
commit ecc4a696c7

View File

@@ -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