diff --git a/endpoints/verbs.py b/endpoints/verbs.py index 5f4ffcfd8..1985f47d4 100644 --- a/endpoints/verbs.py +++ b/endpoints/verbs.py @@ -35,8 +35,10 @@ def _open_stream(namespace, repository, image_list): stream = GzipWrap(StreamLayerMerger(get_next_layer).get_generator()) return stream.read -def _write_image_to_storage(namespace, repository, locations, image_id, queue_file): - image_path = store.image_layer_path(image_id) +def _write_synthetic_image_to_storage(namespace, repository, locations, + synthetic_image_id, queue_file): + # TODO: make sure this synthetic image expires! + image_path = store.image_layer_path(synthetic_image_id) store.stream_write(locations, image_path, queue_file) queue_file.close() @@ -96,7 +98,7 @@ def get_squashed_tag(namespace, repository, tag, headers): # Start the storage saving. storage_args = (namespace, repository, locations, synthetic_image_id, storage_queue_file) - QueueProcess.run_process(_write_image_to_storage, storage_args) + QueueProcess.run_process(_write_synthetic_image_to_storage, storage_args) # Return the client's data. return send_file(client_queue_file)