diff --git a/workers/securityworker.py b/workers/securityworker.py index 4313f1496..e6fe492a1 100644 --- a/workers/securityworker.py +++ b/workers/securityworker.py @@ -18,8 +18,8 @@ from util.secscan.api import SecurityConfigValidator logger = logging.getLogger(__name__) -BATCH_SIZE = 5 -INDEXING_INTERVAL = 60 +BATCH_SIZE = 50 +INDEXING_INTERVAL = 30 API_METHOD_INSERT = '/v1/layers' API_METHOD_VERSION = '/v1/versions/engine' @@ -116,7 +116,7 @@ class SecurityWorker(Worker): # Hopefully, there is no version lower than the target one running set_secscan_status(image, False, self._target_version) - return True + return False else: logger.warning('Got non-201 when analyzing layer ID %s: %s', request['ID'], jsonResponse) return False @@ -172,7 +172,7 @@ class SecurityWorker(Worker): # Analyze the image. analyzed = self._analyze_image(image) if not analyzed: - return + continue # Get the tags of the image we analyzed matching = list(filter_tags_have_repository_event(get_tags_for_image(image.id), event))