Make sure we have defined timeouts on all our requests out to external build services

Fixes #623
This commit is contained in:
Joseph Schorr 2015-10-13 11:21:53 -04:00
parent e80fcc1b28
commit 775b47c851
2 changed files with 3 additions and 2 deletions

View file

@ -265,7 +265,7 @@ class BitbucketBuildTrigger(BuildTriggerHandler):
trigger_uuid = self.trigger.uuid
callback_url = '%s/oauth1/bitbucket/callback/trigger/%s' % (get_app_url(), trigger_uuid)
return BitBucket(key, secret, callback_url)
return BitBucket(key, secret, callback_url, timeout=5)
def _get_authorized_client(self):
""" Returns an authorized API client. """

View file

@ -145,7 +145,8 @@ class GithubBuildTrigger(BuildTriggerHandler):
return Github(self.auth_token,
base_url=github_trigger.api_endpoint(),
client_id=github_trigger.client_id(),
client_secret=github_trigger.client_secret())
client_secret=github_trigger.client_secret(),
timeout=5)
@classmethod
def service_name(cls):