add a timeout to artifact resolve HTTP calls (fixes #18098)

This commit is contained in:
Benjamin Dauvergne 2017-08-22 15:30:09 +02:00
parent 646132c661
commit 850a192bcb
2 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,7 @@ class AppSettings(object):
'TRANSIENT_FEDERATION_ATTRIBUTE': None,
'LOGIN_URL': 'mellon_login',
'LOGOUT_URL': 'mellon_logout',
'ARTIFACT_RESOLVE_TIMEOUT': 10.0,
}
@property

View File

@ -260,6 +260,7 @@ class LoginView(ProfileMixin, LogMixin, View):
try:
result = requests.post(login.msgUrl, data=login.msgBody,
headers={'content-type': 'text/xml'},
timeout=app_settings.ARTIFACT_RESOLVE_TIMEOUT,
verify=verify_ssl_certificate)
except RequestException, e:
self.log.warning('unable to reach %r: %s', login.msgUrl, e)