Merge pull request #3095 from quay/joseph.schorr/QUAY-957/catch-exc

Fix exception in storage replication worker
This commit is contained in:
Joseph Schorr 2018-05-31 14:08:44 -04:00 committed by GitHub
commit 79258fc498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,8 +43,9 @@ class StorageReplicationWorker(QueueWorker):
locations = model.user.get_region_locations(namespace)
# Lookup the image storage.
partial_storage = model.storage.get_storage_by_uuid(storage_uuid)
if not partial_storage:
try:
partial_storage = model.storage.get_storage_by_uuid(storage_uuid)
except model.InvalidImageException:
logger.debug('Unknown storage: %s', storage_uuid)
return True