From b5ea5f32fee44b5f843222bb6f80dcd7add6ebc9 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 16 Nov 2011 12:46:10 +0100 Subject: [PATCH] Variable renamed. --- rq/queue.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rq/queue.py b/rq/queue.py index 256b8e9..6b3d4a7 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -73,11 +73,11 @@ class Queue(object): def count(self): return conn.llen(self.key) - def enqueue(self, job, *args, **kwargs): + def enqueue(self, f, *args, **kwargs): rv_key = '%s:result:%s' % (self.key, str(uuid.uuid4())) - if job.__module__ == '__main__': + if f.__module__ == '__main__': raise ValueError('Functions from the __main__ module cannot be processed by workers.') - message = dumps((job, args, kwargs, rv_key)) + message = dumps((f, args, kwargs, rv_key)) conn.rpush(self.key, message) return DelayedResult(rv_key)