diff --git a/django_q/cluster.py b/django_q/cluster.py index ab60f75..42f750d 100644 --- a/django_q/cluster.py +++ b/django_q/cluster.py @@ -371,7 +371,7 @@ def worker(task_queue, result_queue, timer, timeout=Conf.TIMEOUT): # We're still going if not result: db.close_old_connections() - timer_value = task['kwargs'].pop('timeout', timeout) + timer_value = task.pop('timeout', timeout) # signal execution pre_execute.send(sender="django_q", func=f, task=task) # execute the payload diff --git a/django_q/tasks.py b/django_q/tasks.py index aa8c204..ea2c9b4 100644 --- a/django_q/tasks.py +++ b/django_q/tasks.py @@ -21,7 +21,7 @@ def async_task(func, *args, **kwargs): """Queue a task for the cluster.""" keywords = kwargs.copy() opt_keys = ( - 'hook', 'group', 'save', 'sync', 'cached', 'ack_failure', 'iter_count', 'iter_cached', 'chain', 'broker') + 'hook', 'group', 'save', 'sync', 'cached', 'ack_failure', 'iter_count', 'iter_cached', 'chain', 'broker', 'timeout') q_options = keywords.pop('q_options', {}) # get an id tag = uuid()