s/close_db_filter/CloseForLongOperation
This commit is contained in:
parent
b68e1b5efc
commit
35579093ca
1 changed files with 9 additions and 9 deletions
|
@ -95,8 +95,7 @@ def download_blob(namespace_name, repo_name, digest):
|
||||||
|
|
||||||
# Close the database connection before we stream the download.
|
# Close the database connection before we stream the download.
|
||||||
logger.debug('Closing database connection before streaming layer data')
|
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.
|
# Stream the response to the Docker client.
|
||||||
return Response(
|
return Response(
|
||||||
storage.stream_read(blob.locations, path),
|
storage.stream_read(blob.locations, path),
|
||||||
|
@ -107,6 +106,7 @@ def download_blob(namespace_name, repo_name, digest):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@v2_bp.route('/<repopath:repository>/blobs/uploads/', methods=['POST'])
|
@v2_bp.route('/<repopath:repository>/blobs/uploads/', methods=['POST'])
|
||||||
@parse_repository_name()
|
@parse_repository_name()
|
||||||
@process_registry_jwt_auth(scopes=['pull', 'push'])
|
@process_registry_jwt_auth(scopes=['pull', 'push'])
|
||||||
|
|
Reference in a new issue