Search code examples
celerydjango-celery

Django + Celery Remove task history after 30 days


I believe the default is the task history gets removed after 1 day. I need it to expire after 30 days.

Is CELERY_TASK_RESULT_EXPIRES what I am looking for? Or do I have to make a custom cam?

Thanks!


Solution

  • According to this:

    http://docs.celeryproject.org/en/latest/configuration.html?highlight=celery_task_result_expires#celery-task-result-expires

    CELERY_TASK_RESULT_EXPIRES sounds like exactly what you're looking for. Make sure you check the Note because not all result backends are supported. Some also require celerybeat to be running.