Fix the diffs worker.

This commit is contained in:
Jake Moshenko 2014-06-30 13:51:42 -04:00
parent 684c26bc1a
commit b3bf782035

View file

@ -439,6 +439,10 @@ def process_image_changes(namespace, repository, image_id):
logger.debug('Generating diffs for image: %s' % image_id)
repo_image = model.get_repo_image(namespace, repository, image_id)
if not repo_image:
logger.warning('No image for id: %s', image_id)
return None, None
uuid = repo_image.storage.uuid
image_diffs_path = store.image_file_diffs_path(uuid)
@ -446,7 +450,7 @@ def process_image_changes(namespace, repository, image_id):
if store.exists(repo_image.storage.locations, image_diffs_path):
logger.debug('Diffs already exist for image: %s' % image_id)
return image_trie_path
return image_trie_path, repo_image.storage.locations
image = model.get_image_by_id(namespace, repository, image_id)
parents = model.get_parent_images(namespace, repository, image)