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:
commit
639d7bc797
2 changed files with 3 additions and 2 deletions
|
@ -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. """
|
||||
|
|
|
@ -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):
|
||||
|
|
Reference in a new issue