Merge pull request #2661 from kleesc/securityworker_cpu
Raise an APIRequestFailure exception when security scanner is unavail…
This commit is contained in:
commit
1f76e9dc3b
3 changed files with 9 additions and 5 deletions
|
@ -57,7 +57,7 @@ class LayerAnalyzer(object):
|
|||
except AnalyzeLayerRetryException:
|
||||
# Something went wrong when trying to analyze the layer, but we should retry, so leave
|
||||
# the layer unindexed. Another worker will come along and handle it.
|
||||
pass
|
||||
raise APIRequestFailure
|
||||
except MissingParentLayerException:
|
||||
# Pass upward, as missing parent is handled in the analyze_recursively method.
|
||||
raise
|
||||
|
@ -145,7 +145,7 @@ class LayerAnalyzer(object):
|
|||
try:
|
||||
layer_data = self._api.get_layer_data(layer, include_vulnerabilities=True)
|
||||
except APIRequestFailure:
|
||||
layer_data = None
|
||||
raise
|
||||
|
||||
if layer_data is not None:
|
||||
# Dispatch events for any detected vulnerabilities
|
||||
|
|
Reference in a new issue