mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-08 01:48:11 +08:00
Merge pull request #333 from tremby/fix-timeout-override
Fix timeout override
This commit is contained in:
+1
-1
@@ -371,7 +371,7 @@ def worker(task_queue, result_queue, timer, timeout=Conf.TIMEOUT):
|
|||||||
# We're still going
|
# We're still going
|
||||||
if not result:
|
if not result:
|
||||||
db.close_old_connections()
|
db.close_old_connections()
|
||||||
timer_value = task['kwargs'].pop('timeout', timeout)
|
timer_value = task.pop('timeout', timeout)
|
||||||
# signal execution
|
# signal execution
|
||||||
pre_execute.send(sender="django_q", func=f, task=task)
|
pre_execute.send(sender="django_q", func=f, task=task)
|
||||||
# execute the payload
|
# execute the payload
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ def async_task(func, *args, **kwargs):
|
|||||||
"""Queue a task for the cluster."""
|
"""Queue a task for the cluster."""
|
||||||
keywords = kwargs.copy()
|
keywords = kwargs.copy()
|
||||||
opt_keys = (
|
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', {})
|
q_options = keywords.pop('q_options', {})
|
||||||
# get an id
|
# get an id
|
||||||
tag = uuid()
|
tag = uuid()
|
||||||
|
|||||||
Reference in New Issue
Block a user