rename secscan_endpoint and move db close to API
This commit is contained in:
parent
270010105d
commit
8e2868737b
6 changed files with 33 additions and 30 deletions
|
@ -12,7 +12,7 @@ from endpoints.notificationhelper import spawn_notification
|
|||
from collections import defaultdict
|
||||
from sys import exc_info
|
||||
from peewee import JOIN_LEFT_OUTER
|
||||
from app import app, storage, OVERRIDE_CONFIG_DIRECTORY, secscan_endpoint
|
||||
from app import app, storage, OVERRIDE_CONFIG_DIRECTORY, secscan_api
|
||||
from workers.worker import Worker
|
||||
from data.database import (Image, ImageStorage, ImageStorageLocation, ImageStoragePlacement,
|
||||
db_random_func, UseThenDisconnect, RepositoryTag, Repository,
|
||||
|
@ -256,7 +256,7 @@ class SecurityWorker(Worker):
|
|||
# callback code, etc.
|
||||
try:
|
||||
logger.debug('Loading vulnerabilities for layer %s', img['image_id'])
|
||||
response = secscan_endpoint.call_api('layers/%s/vulnerabilities', request['ID'])
|
||||
response = secscan_api.call('layers/%s/vulnerabilities', request['ID'])
|
||||
except requests.exceptions.Timeout:
|
||||
logger.debug('Timeout when calling Sec')
|
||||
continue
|
||||
|
|
Reference in a new issue