From f80c9255e8ddad27aabe68e54b455ea31b4b8978 Mon Sep 17 00:00:00 2001 From: yackob03 Date: Sun, 20 Oct 2013 03:06:11 -0400 Subject: [PATCH] Fix a bug in the queue query. --- data/queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/queue.py b/data/queue.py index d69596306..0e1383aa2 100644 --- a/data/queue.py +++ b/data/queue.py @@ -30,8 +30,8 @@ class WorkQueue(object): minutes. """ now = datetime.now() - available_or_expired = (QueueItem.available == True | - QueueItem.processing_expires <= now) + available_or_expired = ((QueueItem.available == True) | + (QueueItem.processing_expires <= now)) # TODO the query and the update should be atomic, but for now we only # have one worker.