s/close_db_filter/CloseForLongOperation
This commit is contained in:
parent
b68e1b5efc
commit
35579093ca
1 changed files with 9 additions and 9 deletions
|
@ -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'])
|
||||
|
|
Reference in a new issue