From d2c4a465e34a55ec5e32b498651e67cbf6a59c64 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Tue, 13 Oct 2015 14:51:28 -0400 Subject: [PATCH] add default HTTP timeout to GitLab Fixes #623. --- buildtrigger/gitlabhandler.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildtrigger/gitlabhandler.py b/buildtrigger/gitlabhandler.py index e64476291..bf9844332 100644 --- a/buildtrigger/gitlabhandler.py +++ b/buildtrigger/gitlabhandler.py @@ -113,7 +113,7 @@ class GitLabBuildTrigger(BuildTriggerHandler): def _get_authorized_client(self): host = app.config.get('GITLAB_TRIGGER_CONFIG', {}).get('GITLAB_ENDPOINT', '') 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): return 'hook_id' in self.config diff --git a/requirements.txt b/requirements.txt index 849cd9b78..c1eec4fbe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -97,7 +97,7 @@ git+https://github.com/DevTable/anunidecode.git git+https://github.com/DevTable/pygithub.git git+https://github.com/DevTable/container-cloud-config.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/DevTable/python-etcd.git@sslfix git+https://github.com/NateFerrero/oauth2lib.git