From 5805503004ab68b785ce646fb2415c6cc3a1d6d3 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas@kluyver.me.uk> Date: Tue, 24 May 2022 17:52:16 +0100 Subject: [PATCH] Fix listing succeeded/failed detectors --- webservice/job_monitor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webservice/job_monitor.py b/webservice/job_monitor.py index 4b22704a4..5b1d2140b 100644 --- a/webservice/job_monitor.py +++ b/webservice/job_monitor.py @@ -260,10 +260,10 @@ class JobsMonitor: msg = "Calibration jobs succeeded" else: # List success & failure by karabo_id - krb_ids_ok = {k for (k, v) in krb_id_successes if v == 1} + krb_ids_ok = {k for (k, v) in krb_id_successes.items() if v == 1} ok = ', '.join(sorted(krb_ids_ok)) if krb_ids_ok else 'none' - krb_ids_failed = {k for (k, v) in krb_id_successes if v == 0} - msg = f"Succeeded: {ok}; Failed: {', '.join(krb_ids_failed)}" + krb_ids_failed = {k for (k, v) in krb_id_successes.items() if v == 0} + msg = f"Succeeded: {ok}; Failed: {', '.join(sorted(krb_ids_failed))}" log.debug("Update MDC for %s, %s: %s", r['action'], r['mymdc_id'], msg) -- GitLab