Merge pull request #628 from coreos-inc/btetimeout

Make sure we have defined timeouts on all our requests out to externa…
This commit is contained in:
josephschorr 2015-10-13 11:56:06 -04:00
commit 639d7bc797
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):