From 227e107a82e95f3c24c3322588e363b0a5a94f9b Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 14 Nov 2011 22:26:43 +0100 Subject: [PATCH] Oops, fix some old references to current_connection. --- rq/worker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rq/worker.py b/rq/worker.py index 99198ae..c7d8acd 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -6,7 +6,7 @@ import procname from logbook import Logger from pickle import loads, dumps from .queue import Queue -from .conn import current_connection +from .proxy import conn class NoQueueError(Exception): pass @@ -45,7 +45,7 @@ class Worker(object): def work(self): while True: self.procline('Waiting on %s' % (', '.join(self.queue_names()),)) - queue, msg = current_connection().blpop(self.queue_keys()) + queue, msg = conn.blpop(self.queue_keys()) self.fork_and_perform_job(queue, msg) def fork_and_perform_job(self, queue, msg): @@ -80,7 +80,7 @@ class Worker(object): else: self.log.info('Job ended normally without result') if rv is not None: - p = current_connection().pipeline() + p = conn.pipeline() p.set(key, dumps(rv)) p.expire(key, self.rv_ttl) p.execute()