we're doing some crazy fun stuff with django-celery. A couple of our tasks take a while, and we'd like to let them do their thing. I tried setting CELERYD_TASK_TIME_LIMIT to a big value like 86400 (24 hours) and yet my tasks are still reporting TimeLimitExceeded at 5 minutes. I've read over the docs more times than I'd care to remember, but I cannot find anything referencing either a default value for CELERYD_TASK_TIME_LIMIT or a max value.
Two really valuable questions for us:
In settings.py
CELERYD_TASK_TIME_LIMIT = 86400 #24 hours
CELERYD_TASK_SOFT_TIME_LIMIT = 86400
To answer your question about default values... the defaults for CELERYD_TASK_TIME_LIMIT
and CELERYD_TASK_SOFT_TIME_LIMIT
are both None
. These values are not documented, and a simple grep of the codebase won't help you out much either. I logged all the values of the app's .conf
to find out myself:
>>> import celery
>>> app = celery.Celery()
>>> app.conf