parent
15963fe18c
commit
96d5bbb155
2 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -23,6 +23,12 @@ class DiffsWorker(QueueWorker):
|
|||
msg = ('Image does not exist in database \'%s\' for repo \'%s/\'%s\'' %
|
||||
(image_id, namespace, repository))
|
||||
logger.warning(msg)
|
||||
except IOError:
|
||||
# This exception is unrecoverable, and the item should continue and be
|
||||
# marked as complete.
|
||||
msg = ("Data could not be retrieved for image %s under repo %s/%s" %
|
||||
(image_id, namespace, repository))
|
||||
logger.exception(msg)
|
||||
|
||||
return True
|
||||
|
||||
|
|
Reference in a new issue