Add a TODO and some slightly better naming

This commit is contained in:
Joseph Schorr 2014-09-16 22:44:45 -04:00
parent 1cfb6fc353
commit efc06b54f6

View file

@ -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)