From b4bccb2d311986f0f7f333688130fcfbcce32160 Mon Sep 17 00:00:00 2001 From: msoedov Date: Sun, 4 May 2014 15:32:42 +0300 Subject: [PATCH] Moved @resolve_connection call into @delay wrapper --- rq/decorators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rq/decorators.py b/rq/decorators.py index 90aebf7..169375a 100644 --- a/rq/decorators.py +++ b/rq/decorators.py @@ -20,7 +20,7 @@ class job(object): simple_add.delay(1, 2) # Puts simple_add function into queue """ self.queue = queue - self.connection = resolve_connection(connection) + self.connection = connection self.timeout = timeout self.result_ttl = result_ttl @@ -28,7 +28,7 @@ class job(object): @wraps(f) def delay(*args, **kwargs): if isinstance(self.queue, string_types): - queue = Queue(name=self.queue, connection=self.connection) + queue = Queue(name=self.queue, connection=resolve_connection(self.connection)) else: queue = self.queue if 'depends_on' in kwargs: