From 1792a194bd68865bb0e36a284c7b91e9e06f0a3f Mon Sep 17 00:00:00 2001 From: Malthe Borch Date: Fri, 6 Dec 2013 11:46:17 +0100 Subject: [PATCH 1/2] Should pass a connection here because we might not be using a connection stack. --- rq/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq/worker.py b/rq/worker.py index 69b54a1..5de56b5 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -310,7 +310,7 @@ class Worker(object): except StopRequested: break except UnpickleError as e: - job = Job.safe_fetch(e.job_id) + job = Job.safe_fetch(e.job_id, self.connection) self.handle_exception(job, *sys.exc_info()) continue From 9abbfc4dfb9acefe8b75c4f7864c2e5384d88dbd Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Sat, 7 Dec 2013 13:33:15 +0100 Subject: [PATCH 2/2] Use kwarg to specify connection. --- rq/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq/worker.py b/rq/worker.py index 5de56b5..6a32f8a 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -310,7 +310,7 @@ class Worker(object): except StopRequested: break except UnpickleError as e: - job = Job.safe_fetch(e.job_id, self.connection) + job = Job.safe_fetch(e.job_id, connection=self.connection) self.handle_exception(job, *sys.exc_info()) continue