add a timeout to artifact resolve HTTP calls (fixes #18098)
This commit is contained in:
parent
646132c661
commit
850a192bcb
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue