From cc7ecdf2abb76a7ed21d0cb4c9a9c92559f638c4 Mon Sep 17 00:00:00 2001 From: Brett Naul Date: Sun, 16 Feb 2020 17:32:13 -0800 Subject: [PATCH] Check exact equality for worker state (#3483) --- distributed/scheduler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distributed/scheduler.py b/distributed/scheduler.py index e6e6adf7ced..cba399318cc 100644 --- a/distributed/scheduler.py +++ b/distributed/scheduler.py @@ -276,10 +276,10 @@ def __init__( self.extra = extra or {} def __hash__(self): - return hash((self.name, self.host)) + return hash(self.address) def __eq__(self, other): - return type(self) == type(other) and hash(self) == hash(other) + return type(self) == type(other) and self.address == other.address @property def host(self):