add default HTTP timeout to GitLab

Fixes #623.
This commit is contained in:
Jimmy Zelinskie 2015-10-13 14:51:28 -04:00
parent 0e27852444
commit d2c4a465e3
2 changed files with 2 additions and 2 deletions

View file

@ -113,7 +113,7 @@ class GitLabBuildTrigger(BuildTriggerHandler):
def _get_authorized_client(self): def _get_authorized_client(self):
host = app.config.get('GITLAB_TRIGGER_CONFIG', {}).get('GITLAB_ENDPOINT', '') host = app.config.get('GITLAB_TRIGGER_CONFIG', {}).get('GITLAB_ENDPOINT', '')
auth_token = self.auth_token or 'invalid' auth_token = self.auth_token or 'invalid'
return gitlab.Gitlab(host, oauth_token=auth_token) return gitlab.Gitlab(host, oauth_token=auth_token, timeout=5)
def is_active(self): def is_active(self):
return 'hook_id' in self.config return 'hook_id' in self.config

View file

@ -97,7 +97,7 @@ git+https://github.com/DevTable/anunidecode.git
git+https://github.com/DevTable/pygithub.git git+https://github.com/DevTable/pygithub.git
git+https://github.com/DevTable/container-cloud-config.git git+https://github.com/DevTable/container-cloud-config.git
git+https://github.com/coreos/py-bitbucket.git git+https://github.com/coreos/py-bitbucket.git
git+https://github.com/coreos/pyapi-gitlab.git git+https://github.com/coreos/pyapi-gitlab.git@timeout
git+https://github.com/coreos/mockldap.git git+https://github.com/coreos/mockldap.git
git+https://github.com/DevTable/python-etcd.git@sslfix git+https://github.com/DevTable/python-etcd.git@sslfix
git+https://github.com/NateFerrero/oauth2lib.git git+https://github.com/NateFerrero/oauth2lib.git