Skip to content

Commit

Permalink
Check exact equality for worker state (#3483)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnaul authored Feb 17, 2020
1 parent 9408ebc commit cc7ecdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit cc7ecdf

Please sign in to comment.