Add uncompressed size field to the image storage and add a backfill script (which is not yet automatically called)

This commit is contained in:
Joseph Schorr 2014-09-23 14:01:27 -04:00
parent f6d3238611
commit 86dfca2e3e
5 changed files with 59 additions and 1 deletions

View file

@ -452,7 +452,8 @@ def put_image_json(namespace, repository, image_id):
set_uploading_flag(repo_image, True)
# We cleanup any old checksum in case it's a retry after a fail
profile.debug('Cleanup old checksum')
profile.debug('Cleanup old checksum and save size')
repo_image.storage.uncompressed_size = data.get('Size')
repo_image.storage.checksum = None
repo_image.storage.save()