diff options
Diffstat (limited to 'rq/queue.py')
-rw-r--r-- | rq/queue.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rq/queue.py b/rq/queue.py index 3aea012..b8b5b47 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -291,7 +291,12 @@ class Queue(object): # Detect explicit invocations, i.e. of the form: # q.enqueue(foo, args=(1, 2), kwargs={'a': 1}, timeout=30) - timeout = kwargs.pop('timeout', None) + timeout = kwargs.pop('job_timeout', None) + if timeout is None: + timeout = kwargs.pop('timeout', None) + if timeout: + warnings.warn('The `timeout` keyword is deprecated. Use `job_timeout` instead', DeprecationWarning) + description = kwargs.pop('description', None) result_ttl = kwargs.pop('result_ttl', None) ttl = kwargs.pop('ttl', None) |