From dcf0bd78d5708a2ad7cf3c4e2673e91c71e891e4 Mon Sep 17 00:00:00 2001 From: Francesco Nazzaro Date: Thu, 16 Jan 2025 15:59:37 +0100 Subject: [PATCH] Refactor logging in job termination process for improved readability --- cads_broker/dispatcher.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cads_broker/dispatcher.py b/cads_broker/dispatcher.py index 3e3eedb..f4a8b41 100644 --- a/cads_broker/dispatcher.py +++ b/cads_broker/dispatcher.py @@ -108,9 +108,13 @@ def kill_job_on_worker(client: distributed.Client, request_uid: str) -> None: workers=[worker_ip], nanny=True, ) - logger.info("killing worker", job_id=request_uid, pid=pid, worker_ip=worker_ip) + logger.info( + "killing worker", job_id=request_uid, pid=pid, worker_ip=worker_ip + ) except (KeyError, NameError): - logger.warning("worker not found", job_id=request_uid, pid=pid, worker_ip=worker_ip) + logger.warning( + "worker not found", job_id=request_uid, pid=pid, worker_ip=worker_ip + ) def cancel_jobs_on_scheduler(client: distributed.Client, job_ids: list[str]) -> None: