From 9b04db9ec98e9cb3137bd19b8069b95a89da8082 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Fri, 15 Oct 2021 14:50:30 +0100 Subject: [PATCH] fix test --- distributed/scheduler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/distributed/scheduler.py b/distributed/scheduler.py index 2ea40f4fdff..3fa84b19878 100644 --- a/distributed/scheduler.py +++ b/distributed/scheduler.py @@ -5458,6 +5458,10 @@ def handle_worker_status_change(self, status: str, worker: str) -> None: if not ws: return prev_status = ws._status + ws._status = Status.lookup[status] # type: ignore + if ws._status == prev_status: + return + self.log_event( ws._address, { @@ -5466,9 +5470,6 @@ def handle_worker_status_change(self, status: str, worker: str) -> None: "status": status, }, ) - ws._status = Status.lookup[status] # type: ignore - if ws._status == prev_status: - return if ws._status == Status.running: parent._running.add(ws)