From c154570cb029d994d158231fbd5a55c189a71568 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas@kluyver.me.uk> Date: Fri, 10 Feb 2023 17:25:47 +0000 Subject: [PATCH] Replace setting 'NA' in myMdC with 'E' for error --- webservice/job_monitor.py | 2 +- webservice/webservice.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webservice/job_monitor.py b/webservice/job_monitor.py index ce5a6a058..037575d8e 100644 --- a/webservice/job_monitor.py +++ b/webservice/job_monitor.py @@ -279,7 +279,7 @@ class JobsMonitor: log.debug("Update MDC for %s, %s: %s", r['action'], r['mymdc_id'], msg) if r['action'] == 'CORRECT': - status = 'A' if success else 'NA' # Not-/Available + status = 'A' if success else 'E' # Available/Error self.mymdc_update_run(r['mymdc_id'], msg, status) else: # r['action'] == 'DARK' status = 'F' if success else 'E' # Finished/Error diff --git a/webservice/webservice.py b/webservice/webservice.py index 600168b54..25c3d1fe6 100644 --- a/webservice/webservice.py +++ b/webservice/webservice.py @@ -742,13 +742,13 @@ async def update_mdc_status(mdc: MetadataClient, action: str, https://git.xfel.eu/gitlab/detectors/pycalibration/wikis/MyMDC-Communication """ if message.split(':')[0] in ('FAILED', 'WARN'): # Errors - flag = 'NA' if action == 'correct' else 'E' + flag = 'E' elif message.split(':')[0] == 'SUCCESS': # Success flag = 'R' if action == 'correct' else 'IP' if 'Uploaded' in message or 'Finished' in message: flag = 'A' if action == 'correct' else 'F' else: # MDC Timeout - flag = 'NA' if action == 'correct' else 'T' + flag = 'E' if action == 'correct' else 'T' if action == 'correct': func = mdc.update_run_api -- GitLab