s/close_db_filter/CloseForLongOperation

This commit is contained in:
Jimmy Zelinskie 2016-08-03 15:18:51 -04:00
parent b68e1b5efc
commit 35579093ca

View file

@ -95,16 +95,16 @@ def download_blob(namespace_name, repo_name, digest):
# Close the database connection before we stream the download.
logger.debug('Closing database connection before streaming layer data')
database.close_db_filter(None)
with database.CloseForLongOperation(app.config):
# Stream the response to the Docker client.
return Response(
storage.stream_read(blob.locations, path),
headers=headers.update({
'Content-Length': blob.size,
'Content-Type': BLOB_CONTENT_TYPE,
}),
)
# Stream the response to the Docker client.
return Response(
storage.stream_read(blob.locations, path),
headers=headers.update({
'Content-Length': blob.size,
'Content-Type': BLOB_CONTENT_TYPE,
}),
)
@v2_bp.route('/<repopath:repository>/blobs/uploads/', methods=['POST'])