Merge pull request #395 from methane/patch-1

Easy refactoring on decorators.py
main
Selwin Ong 11 years ago
commit 2409e817ad

@ -36,10 +36,7 @@ class job(object):
queue = Queue(name=self.queue, connection=self.connection) queue = Queue(name=self.queue, connection=self.connection)
else: else:
queue = self.queue queue = self.queue
if 'depends_on' in kwargs: depends_on = kwargs.pop('depends_on', None)
depends_on = kwargs.pop('depends_on')
else:
depends_on = None
return queue.enqueue_call(f, args=args, kwargs=kwargs, return queue.enqueue_call(f, args=args, kwargs=kwargs,
timeout=self.timeout, result_ttl=self.result_ttl, depends_on=depends_on) timeout=self.timeout, result_ttl=self.result_ttl, depends_on=depends_on)
f.delay = delay f.delay = delay

Loading…
Cancel
Save