Hard timeouts using celery with django -
building on question:
django celery time limit exceeded?
i have tasks may run sometime. however, tasks should not take more few seconds. don't want set global timeout account long running tasks. rather, have global hard timelimit short, , manually adjust tasks need have longer timeout.
when decorating task @task did @task(timeout=none) , yet, task still hit timeout of 300 seconds. called task task_function.delay(args).
is there way call task , customize it's timeout?
this issue addresses case when can call task custom timeouts. implemented in issue802 branch isn't in master yet. can merge master , use desired functionality.
with patch, can pass timeouts when calling tasks.
tasks.add.apply_async(args=[1,2], soft_timeout=2, timeout=5)
Comments
Post a Comment