Fix exceptions raised by the diffs worker

Fixes #465
This commit is contained in:
Joseph Schorr 2015-09-10 14:12:16 -04:00
parent 15963fe18c
commit 96d5bbb155
2 changed files with 12 additions and 1 deletions

View file

@ -185,7 +185,12 @@ class WorkQueue(object):
def complete(self, completed_item):
with self._transaction_factory(db):
completed_item_obj = self._item_by_id_for_update(completed_item.id)
try:
completed_item_obj = self._item_by_id_for_update(completed_item.id)
except QueueItem.DoesNotExist:
self._currently_processing = False
return
completed_item_obj.delete_instance(recursive=True)
self._currently_processing = False