various securityworker fixes
This commit is contained in:
parent
4ae18cf249
commit
f62a05f6d7
1 changed files with 4 additions and 4 deletions
|
@ -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))
|
||||
|
|
Reference in a new issue