Increase POST timeout in secscan API
This commit is contained in:
parent
8f0eb3c4cd
commit
d36528a77a
2 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Reference in a new issue