buildman: linter fixes

This commit is contained in:
Evan Cordell 2016-10-04 10:42:31 -04:00
parent f4e1748bb7
commit 943a20f042

View file

@ -511,7 +511,6 @@ class EphemeralBuilderManager(BaseManager):
except etcd.EtcdException:
logger.exception('Exception when writing realm %s to etcd for job %s', realm, build_uuid)
# Store the realm spec which will allow any manager to accept this builder when it connects
realm_spec = json.dumps({
'realm': realm,
@ -555,7 +554,8 @@ class EphemeralBuilderManager(BaseManager):
job.build_uuid, build_component.builder_realm)
yield From(build_component.start_build(job))
yield From(self._write_duration_metric(metric_queue.builder_time_to_build, build_component.builder_realm))
yield From(self._write_duration_metric(metric_queue.builder_time_to_build,
build_component.builder_realm))
try:
# Clean up the bookkeeping for allowing any manager to take the job.
@ -680,7 +680,9 @@ class EphemeralBuilderManager(BaseManager):
metric_data = yield From(self._etcd_client.read(self._etcd_metric_key(realm)))
parsed_metric_data = json.loads(metric_data.value)
start_time = parsed_metric_data['start_time']
metric.Observe(time.time() - start_time, labelvalues=[parsed_metric_data.get('executor_name', 'unknown')])
metric.Observe(time.time() - start_time,
labelvalues=[parsed_metric_data.get('executor_name',
'unknown')])
except Exception:
logger.exception("Could not write metric for realm %s", realm)