Skip to content

Commit

Permalink
don't heartbeat when closing
Browse files Browse the repository at this point in the history
TODO make this a separate PR and add tests. Just want to see if it helps CI.
  • Loading branch information
gjoseph92 committed Jun 8, 2022
1 parent d037f37 commit 7d90e2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions distributed/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,9 @@ async def heartbeat(self):
if self.heartbeat_active:
logger.debug("Heartbeat skipped: channel busy")
return
if self.status in {Status.closing, Status.closed, Status.failed}:
logger.debug(f"Heartbeat skipped: {self.status=}")
return
self.heartbeat_active = True
logger.debug("Heartbeat: %s", self.address)
try:
Expand Down

0 comments on commit 7d90e2a

Please sign in to comment.