Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: scripts/master/deferred_resource.py

Issue 2254643002: Instrument HTTP client requests to buildbucket (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@reland-tsmon-metrics
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/master/buildbucket/client.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/master/deferred_resource.py
diff --git a/scripts/master/deferred_resource.py b/scripts/master/deferred_resource.py
index 0f613f1ec2c8c0d627bc4f68a122bdfe60c8be9a..c7d6b27d24e940749ee1b8993ea16b591fb4c08f 100644
--- a/scripts/master/deferred_resource.py
+++ b/scripts/master/deferred_resource.py
@@ -161,7 +161,7 @@ class DeferredResource(object):
self.api = self.Api(self)
self._th_local = threading.local()
self.started = False
- self.timeout = timeout
+ self._resource._http.timeout = timeout
@classmethod
def _create_thread_pool(cls, max_concurrent_requests):
@@ -335,7 +335,7 @@ class DeferredResource(object):
if create_creds:
self._th_local.credentials = None
self._th_local.credentials_expiry = None
- self._th_local.http = httplib2.Http(timeout=self.timeout)
+ self._th_local.http = self._resource._http
nodir 2016/08/17 07:01:52 That doesn't look thread-safe anymore
dsansome 2016/08/17 08:55:41 Ah so *that's* why it's done this way. I've chang
nodir 2016/08/17 21:07:29 Yes, th_local is threading.Local
if self.credentials is not None:
creds = self.credentials
ttl = None
« no previous file with comments | « scripts/master/buildbucket/client.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698