Fix a bug in the queue query.

This commit is contained in:
yackob03 2013-10-20 03:06:11 -04:00
parent cf1b545dee
commit f80c9255e8

View file

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