From 4fb2914c6fa82422ad5fd58c63c08f14721e77b4 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Thu, 7 Aug 2014 00:58:06 +0900 Subject: [PATCH] Easy refactoring on decorators.py --- rq/decorators.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rq/decorators.py b/rq/decorators.py index 3d940be..5c5e00b 100644 --- a/rq/decorators.py +++ b/rq/decorators.py @@ -36,10 +36,7 @@ class job(object): queue = Queue(name=self.queue, connection=self.connection) else: queue = self.queue - if 'depends_on' in kwargs: - depends_on = kwargs.pop('depends_on') - else: - depends_on = None + depends_on = kwargs.pop('depends_on', None) return queue.enqueue_call(f, args=args, kwargs=kwargs, timeout=self.timeout, result_ttl=self.result_ttl, depends_on=depends_on) f.delay = delay