Skip to content

Commit

Permalink
Refactor logging in job termination process for improved readability
Browse files Browse the repository at this point in the history
  • Loading branch information
francesconazzaro committed Jan 16, 2025
1 parent 2c2f8bf commit dcf0bd7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cads_broker/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit dcf0bd7

Please sign in to comment.