Merge branch 'master' of https://bitbucket.org/yackob03/quay
This commit is contained in:
commit
76508218f4
21 changed files with 393 additions and 328 deletions
|
@ -36,9 +36,13 @@ def backfill_sizes_from_json():
|
|||
uuid = image_storage.uuid
|
||||
with_locations = model.get_storage_by_uuid(uuid)
|
||||
|
||||
json_string = store.get_content(with_locations.locations, store.image_json_path(uuid))
|
||||
json_data = json.loads(json_string)
|
||||
size = json_data.get('Size', json_data.get('size', -1))
|
||||
try:
|
||||
json_string = store.get_content(with_locations.locations, store.image_json_path(uuid))
|
||||
json_data = json.loads(json_string)
|
||||
size = json_data.get('Size', json_data.get('size', -1))
|
||||
except IOError:
|
||||
logger.debug('Image storage with no json %s', uuid)
|
||||
size = -1
|
||||
|
||||
if size == -1:
|
||||
missing += 1
|
||||
|
|
Reference in a new issue