Skip to content

Commit

Permalink
Log stimulus_id in retire_worker (#8003)
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky authored Jul 17, 2023
1 parent de50c90 commit 6ea9cbc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4985,7 +4985,7 @@ async def remove_worker(

host = get_address_host(address)

ws: WorkerState = self.workers[address]
ws = self.workers[address]

event_msg = {
"action": "remove-worker",
Expand All @@ -4995,7 +4995,7 @@ async def remove_worker(
event_msg["worker"] = address
self.log_event("all", event_msg)

logger.info("Remove worker %s", ws)
logger.info(f"Remove worker {ws} ({stimulus_id=})")
if close:
with suppress(AttributeError, CommClosedError):
self.stream_comms[address].send(
Expand All @@ -5004,7 +5004,7 @@ async def remove_worker(

self.remove_resources(address)

dh: dict = self.host_info[host]
dh = self.host_info[host]
dh_addresses: set = dh["addresses"]
dh_addresses.remove(address)
dh["nthreads"] -= ws.nthreads
Expand All @@ -5025,7 +5025,6 @@ async def remove_worker(

recommendations: Recs = {}

ts: TaskState
for ts in list(ws.processing):
k = ts.key
recommendations[k] = "released"
Expand Down

0 comments on commit 6ea9cbc

Please sign in to comment.