From e68bebbc625fdd765d98e82934a0d2d9f089d1d4 Mon Sep 17 00:00:00 2001 From: Clint Armstrong Date: Mon, 13 Jul 2015 10:10:49 -0400 Subject: [PATCH] bad index --- poller-service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/poller-service.py b/poller-service.py index db20994f0..f92eae490 100755 --- a/poller-service.py +++ b/poller-service.py @@ -246,13 +246,15 @@ while True: # add queue lock, so we lock the next device against any other pollers # if this fails, the device is locked by another poller already if not getLock('queued.{}'.format(device_id)): + time.sleep(.5) continue if not lockFree('polling.{}'.format(device_id)): releaseLock('queued.{}'.format(device_id)) + time.sleep(.5) continue if next_poll and next_poll > datetime.now(): - log.debug('DEBUG: Sleeping until {0} before polling {2}'.format(next_poll, device_id)) + log.debug('DEBUG: Sleeping until {0} before polling {1}'.format(next_poll, device_id)) sleep_until(next_poll) action = 'poll'