diff --git a/data/queue.py b/data/queue.py index 601092982..f05ee9c8f 100644 --- a/data/queue.py +++ b/data/queue.py @@ -184,7 +184,8 @@ class WorkQueue(object): processing_expires=now + timedelta(seconds=processing_time), retries_remaining=QueueItem.retries_remaining-1) .where(QueueItem.id == db_item.id)) - changed_query = self._available_jobs_where(set_unavailable_query, now) + changed_query = (self._available_jobs_where(set_unavailable_query, now) + .where(QueueItem.processing_expires == db_item.processing_expires)) changed = changed_query.execute() if changed == 1: item = AttrDict({