diff --git a/rq/worker.py b/rq/worker.py index d14bf88..a2bbb2a 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -581,11 +581,13 @@ class Worker(object): return self._exc_handlers.pop() def __eq__(self, other): + """Equality does not take the database/connection into account""" if not isinstance(other, self.__class__): raise TypeError('Cannot compare workers to other types (of workers)') return self.name == other.name def __hash__(self): + """The hash does not take the database/connection into account""" return hash(self.name)