buildman: linter fixes
This commit is contained in:
parent
f4e1748bb7
commit
943a20f042
1 changed files with 12 additions and 10 deletions
|
@ -511,7 +511,6 @@ class EphemeralBuilderManager(BaseManager):
|
||||||
except etcd.EtcdException:
|
except etcd.EtcdException:
|
||||||
logger.exception('Exception when writing realm %s to etcd for job %s', realm, build_uuid)
|
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
|
# Store the realm spec which will allow any manager to accept this builder when it connects
|
||||||
realm_spec = json.dumps({
|
realm_spec = json.dumps({
|
||||||
'realm': realm,
|
'realm': realm,
|
||||||
|
@ -555,7 +554,8 @@ class EphemeralBuilderManager(BaseManager):
|
||||||
job.build_uuid, build_component.builder_realm)
|
job.build_uuid, build_component.builder_realm)
|
||||||
yield From(build_component.start_build(job))
|
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:
|
try:
|
||||||
# Clean up the bookkeeping for allowing any manager to take the job.
|
# 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)))
|
metric_data = yield From(self._etcd_client.read(self._etcd_metric_key(realm)))
|
||||||
parsed_metric_data = json.loads(metric_data.value)
|
parsed_metric_data = json.loads(metric_data.value)
|
||||||
start_time = parsed_metric_data['start_time']
|
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:
|
except Exception:
|
||||||
logger.exception("Could not write metric for realm %s", realm)
|
logger.exception("Could not write metric for realm %s", realm)
|
||||||
|
|
||||||
|
|
Reference in a new issue