Add a TODO and some slightly better naming
This commit is contained in:
parent
1cfb6fc353
commit
efc06b54f6
1 changed files with 5 additions and 3 deletions
|
@ -35,8 +35,10 @@ def _open_stream(namespace, repository, image_list):
|
||||||
stream = GzipWrap(StreamLayerMerger(get_next_layer).get_generator())
|
stream = GzipWrap(StreamLayerMerger(get_next_layer).get_generator())
|
||||||
return stream.read
|
return stream.read
|
||||||
|
|
||||||
def _write_image_to_storage(namespace, repository, locations, image_id, queue_file):
|
def _write_synthetic_image_to_storage(namespace, repository, locations,
|
||||||
image_path = store.image_layer_path(image_id)
|
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)
|
store.stream_write(locations, image_path, queue_file)
|
||||||
queue_file.close()
|
queue_file.close()
|
||||||
|
|
||||||
|
@ -96,7 +98,7 @@ def get_squashed_tag(namespace, repository, tag, headers):
|
||||||
|
|
||||||
# Start the storage saving.
|
# Start the storage saving.
|
||||||
storage_args = (namespace, repository, locations, synthetic_image_id, storage_queue_file)
|
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 the client's data.
|
||||||
return send_file(client_queue_file)
|
return send_file(client_queue_file)
|
||||||
|
|
Reference in a new issue