From b3b3f0892b6192ca14c9d2a06e16ae267d55b8b3 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Wed, 24 Apr 2024 09:22:59 -0500 Subject: [PATCH] Mark cancelled jobs as error --- pysqa/wrapper/flux.py | 1 + tests/test_flux.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pysqa/wrapper/flux.py b/pysqa/wrapper/flux.py index efa5209..f7b9d2d 100644 --- a/pysqa/wrapper/flux.py +++ b/pysqa/wrapper/flux.py @@ -43,5 +43,6 @@ def convert_queue_status(queue_status_output: str) -> pandas.DataFrame: ) df.loc[df.status == "R", "status"] = "running" df.loc[df.status == "S", "status"] = "pending" + df.loc[df.status == "C", "status"] = "error" df.loc[df.status == "CD", "status"] = "finished" return df diff --git a/tests/test_flux.py b/tests/test_flux.py index 431a3eb..ac0d113 100644 --- a/tests/test_flux.py +++ b/tests/test_flux.py @@ -105,4 +105,4 @@ def test_flux_integration(self): ) self.assertEqual(self.flux.get_status_of_job(process_id=job_id), 'running') self.flux.delete_job(process_id=job_id) - self.assertEqual(self.flux.get_status_of_job(process_id=job_id), 'C') + self.assertEqual(self.flux.get_status_of_job(process_id=job_id), 'erro')