Merge pull request #888 from karech/master

Add at_front option for decorated functions
main
Selwin Ong 7 years ago committed by GitHub
commit 90bf8f0cf1

@ -44,8 +44,9 @@ class job(object): # noqa
else: else:
queue = self.queue queue = self.queue
depends_on = kwargs.pop('depends_on', None) depends_on = kwargs.pop('depends_on', None)
at_front = kwargs.pop('at_front', False)
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, timeout=self.timeout, result_ttl=self.result_ttl,
ttl=self.ttl, depends_on=depends_on) ttl=self.ttl, depends_on=depends_on, at_front=at_front)
f.delay = delay f.delay = delay
return f return f

Loading…
Cancel
Save