securityworker: mark children we can't analyze
This allows us to differentiate between images that are queued and those we can't analyze in constant time.
This commit is contained in:
parent
9c8e1eb506
commit
1162814734
2 changed files with 6 additions and 1 deletions
|
@ -163,6 +163,12 @@ class SecurityWorker(Worker):
|
|||
|
||||
logger.debug('Found %d images to index', len(images))
|
||||
for image in images:
|
||||
# If we couldn't analyze the parent, we can't analyze this image.
|
||||
if (image.parent and not image.parent.security_indexed and
|
||||
image.parent.security_indexed_engine >= self._target_version):
|
||||
set_secscan_status(image, False, self._target_version)
|
||||
continue
|
||||
|
||||
# Analyze the image.
|
||||
analyzed = self._analyze_image(image)
|
||||
if not analyzed:
|
||||
|
|
Reference in a new issue