diff --git a/config.py b/config.py index 1d2cd9e32..d3fc2d2b8 100644 --- a/config.py +++ b/config.py @@ -286,6 +286,7 @@ class DefaultConfig(object): 'ENGINE_VERSION_TARGET': 2, 'API_VERSION': 'v1', 'API_TIMEOUT_SECONDS': 10, + 'API_TIMEOUT_POST_SECONDS': 480, } # Torrent management flags diff --git a/util/secscan/api.py b/util/secscan/api.py index 01a5d963c..73eaa5f4c 100644 --- a/util/secscan/api.py +++ b/util/secscan/api.py @@ -248,11 +248,12 @@ class SecurityScannerAPI(object): client = self.config['HTTPCLIENT'] headers = {'Connection': 'close'} timeout = security_config.get('API_TIMEOUT_SECONDS', 1) + post_timeout = security_config.get('API_TIMEOUT_POST_SECONDS', 480) with CloseForLongOperation(self.config): if method == 'POST': logger.debug('POSTing security URL %s', url) - return client.post(url, json=body, params=params, timeout=timeout, cert=self._keys, + return client.post(url, json=body, params=params, timeout=post_timeout, cert=self._keys, verify=self._certificate, headers=headers) elif method == 'DELETE': logger.debug('DELETEing security URL %s', url)