diff --git a/executorlib/task_scheduler/file/queue_spawner.py b/executorlib/task_scheduler/file/queue_spawner.py index 7060dd6a..2ec1400e 100644 --- a/executorlib/task_scheduler/file/queue_spawner.py +++ b/executorlib/task_scheduler/file/queue_spawner.py @@ -1,3 +1,4 @@ +import contextlib import os import subprocess from typing import Optional, Union @@ -110,7 +111,8 @@ def terminate_with_pysqa( ) status = qa.get_status_of_job(process_id=queue_id) if status is not None and status not in ["finished", "error"]: - qa.delete_job(process_id=queue_id) + with contextlib.suppress(subprocess.CalledProcessError): + qa.delete_job(process_id=queue_id) def _pysqa_execute_command(