Fix backfill content checksums

This commit is contained in:
Joseph Schorr 2016-01-07 12:34:19 -05:00
parent c34399a217
commit fa42693cdd

View file

@ -54,7 +54,6 @@ class ImageStoragePlacement(BaseModel):
location = ForeignKeyField(ImageStorageLocation)
def _get_image_storage_locations(storage_id):
placements_query = (ImageStoragePlacement
.select(ImageStoragePlacement, ImageStorageLocation)
@ -91,7 +90,7 @@ def backfill_content_checksums():
with CloseForLongOperation(app.config):
try:
# Compute the checksum
layer_path = storage.image_layer_path(candidate_storage.uuid)
layer_path = storage.v1_image_layer_path(candidate_storage.uuid)
with storage.stream_read_file(locations, layer_path) as layer_data_handle:
checksum = 'sha256:{0}'.format(checksums.sha256_file(layer_data_handle))
except Exception as exc: