From 0ad4cb3410483dae10381a781d14e3d485a91a08 Mon Sep 17 00:00:00 2001 From: Travis Johnson Date: Mon, 8 Dec 2014 18:29:55 -0500 Subject: [PATCH] comments --- rq/worker.py | 2 ++ 1 file changed, 2 insertions(+) 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)