From 41946d1bb36a8001d58b05ceb8385240806236ac Mon Sep 17 00:00:00 2001 From: Selwin Ong Date: Mon, 27 Aug 2012 13:14:53 +0700 Subject: [PATCH] Worker.find_by_key now properly uses connection. --- rq/worker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rq/worker.py b/rq/worker.py index 389ca77..1ea226f 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -84,11 +84,12 @@ class Worker(object): return None name = worker_key[len(prefix):] - worker = cls([], name) + worker = cls([], name, connection=connection) queues = connection.hget(worker.key, 'queues') worker._state = connection.hget(worker.key, 'state') or '?' if queues: - worker.queues = map(Queue, queues.split(',')) + worker.queues = [Queue(queue, connection=connection) + for queue in queues.split(',')] return worker