Fix issues with the perf updated code
This commit is contained in:
parent
d5bbb57481
commit
691be49817
2 changed files with 5 additions and 1 deletions
|
@ -1235,12 +1235,16 @@ def find_create_or_link_image(docker_image_id, repository, username, translation
|
||||||
# If there is an existing image, we try to translate its ancestry and copy its storage.
|
# If there is an existing image, we try to translate its ancestry and copy its storage.
|
||||||
new_image = None
|
new_image = None
|
||||||
try:
|
try:
|
||||||
|
logger.debug('Looking up existing image for ID: %s', docker_image_id)
|
||||||
existing_image = existing_image_query.get()
|
existing_image = existing_image_query.get()
|
||||||
|
|
||||||
|
logger.debug('Existing image %s found for ID: %s', existing_image.id, docker_image_id)
|
||||||
new_image = _find_or_link_image(existing_image, repository, username, translations,
|
new_image = _find_or_link_image(existing_image, repository, username, translations,
|
||||||
preferred_location)
|
preferred_location)
|
||||||
if new_image:
|
if new_image:
|
||||||
return new_image
|
return new_image
|
||||||
except Image.DoesNotExist:
|
except Image.DoesNotExist:
|
||||||
|
logger.debug('No existing image found for ID: %s', docker_image_id)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Otherwise, create a new storage directly.
|
# Otherwise, create a new storage directly.
|
||||||
|
|
|
@ -7,7 +7,7 @@ from functools import wraps
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
from app import storage as store, image_diff_queue
|
from app import storage as store, image_diff_queue, app
|
||||||
from auth.auth import process_auth, extract_namespace_repo_from_session
|
from auth.auth import process_auth, extract_namespace_repo_from_session
|
||||||
from util import checksums, changes
|
from util import checksums, changes
|
||||||
from util.http import abort, exact_abort
|
from util.http import abort, exact_abort
|
||||||
|
|
Reference in a new issue