Oops, fix some old references to current_connection.

main
Vincent Driessen 13 years ago
parent d721f0708b
commit 227e107a82

@ -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()

Loading…
Cancel
Save