Fix security worker (again?)
This commit is contained in:
parent
7e9faa6c54
commit
88e85cded0
2 changed files with 22 additions and 27 deletions
|
@ -13,7 +13,7 @@ from data import model
|
|||
from data.model.tag import filter_tags_have_repository_event, get_tags_for_image
|
||||
from data.model.image import get_secscan_candidates, set_secscan_status
|
||||
from data.model.storage import get_storage_locations
|
||||
from data.database import (Image, UseThenDisconnect, ExternalNotificationEvent)
|
||||
from data.database import (UseThenDisconnect, ExternalNotificationEvent)
|
||||
from util.secscan.api import SecurityConfigValidator
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -154,11 +154,8 @@ class SecurityWorker(Worker):
|
|||
while True:
|
||||
# Lookup the images to index.
|
||||
images = []
|
||||
try:
|
||||
logger.debug('Looking up images to index')
|
||||
images = get_secscan_candidates(self._target_version, BATCH_SIZE)
|
||||
except Image.DoesNotExist:
|
||||
pass
|
||||
logger.debug('Looking up images to index')
|
||||
images = get_secscan_candidates(self._target_version, BATCH_SIZE)
|
||||
|
||||
if not images:
|
||||
logger.debug('No more images left to analyze')
|
||||
|
|
Reference in a new issue