| Index: infra_libs/ts_mon/common/monitors.py
|
| diff --git a/infra_libs/ts_mon/common/monitors.py b/infra_libs/ts_mon/common/monitors.py
|
| index f3c3bb8a7d60f584a26ce9b2dd04f99f2597d50d..eb2433fb043950a38051eb95d96429d0a97a4a65 100644
|
| --- a/infra_libs/ts_mon/common/monitors.py
|
| +++ b/infra_libs/ts_mon/common/monitors.py
|
| @@ -64,6 +64,8 @@ class PubSubMonitor(Monitor):
|
| 'https://www.googleapis.com/auth/pubsub',
|
| ]
|
|
|
| + TIMEOUT = 10 # seconds
|
| +
|
| def _load_credentials(self, credentials_file_path):
|
| if credentials_file_path == GCE_CREDENTIALS:
|
| return gce.AppAssertionCredentials(self._SCOPES)
|
| @@ -120,9 +122,10 @@ class PubSubMonitor(Monitor):
|
| self._api = None
|
| self._use_instrumented_http = use_instrumented_http
|
| if use_instrumented_http:
|
| - self._http = httplib2_utils.InstrumentedHttp('acq-mon-api-pubsub')
|
| + self._http = httplib2_utils.InstrumentedHttp(
|
| + 'acq-mon-api-pubsub', timeout=self.TIMEOUT)
|
| else:
|
| - self._http = httplib2.Http()
|
| + self._http = httplib2.Http(timeout=self.TIMEOUT)
|
| self._credsfile = credsfile
|
| self._topic = 'projects/%s/topics/%s' % (project, topic)
|
| self._check_initialize()
|
|
|