diff --git a/mellon/app_settings.py b/mellon/app_settings.py index a84f8c5..aeeab73 100644 --- a/mellon/app_settings.py +++ b/mellon/app_settings.py @@ -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 diff --git a/mellon/views.py b/mellon/views.py index 40fd2bf..e7dc04c 100644 --- a/mellon/views.py +++ b/mellon/views.py @@ -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)