Change registry code to disconnect from the DB before long I/O operations
This commit is contained in:
parent
23d9bd2b42
commit
d5bbb57481
3 changed files with 26 additions and 7 deletions
|
@ -101,6 +101,9 @@ def get_squashed_tag(namespace, repository, tag):
|
|||
logger.debug('Redirecting to download URL for derived image %s', derived.uuid)
|
||||
return redirect(download_url)
|
||||
|
||||
# Close the database handle here for this process before we send the long download.
|
||||
database.close_db_filter(None)
|
||||
|
||||
logger.debug('Sending cached derived image %s', derived.uuid)
|
||||
return send_file(store.stream_read_file(derived.locations, derived_layer_path))
|
||||
|
||||
|
|
Reference in a new issue