)
-class JobResults(TeuthologyMetric):
+class _JobResults(TeuthologyMetric):
def __init__(self):
self.metric = Counter(
"teuthology_job_results",
self.metric.labels(machine_type=machine_type, status=status).inc()
+JobResults = _JobResults()
+
NodeLockingTime = Summary(
"teuthology_node_locking_duration_seconds",
"Time spent waiting to lock nodes",
owner = job_info['owner']
kill_processes(run_name, [job_info.get('pid')])
if 'machine_type' in job_info:
- teuthology.exporter.JobResults().record(
+ teuthology.exporter.JobResults.record(
job_info["machine_type"],
job_info.get("status", "dead")
)
reporter.report_job(run_name, job_id, job_info)
status = get_status(job_info)
if status in ["pass", "fail", "dead"] and "machine_type" in job_info:
- teuthology.exporter.JobResults().record(job_info["machine_type"], status)
+ teuthology.exporter.JobResults.record(job_info["machine_type"], status)
def try_push_job_info(job_config, extra_info=None):
log.info("Marking job {job_id} as dead".format(job_id=job_id))
reporter.report_job(run_name, job['job_id'], dead=True)
if "machine_type" in job:
- teuthology.exporter.JobResults().record(job["machine_type"], job["status"])
+ teuthology.exporter.JobResults.record(job["machine_type"], job["status"])
except report_exceptions:
log.exception("Could not mark job as dead: {job_id}".format(
job_id=job_id))