celery task clean-up with DB backend

后端 未结 1 1216
天命终不由人
天命终不由人 2021-02-08 08:30

I\'m trying to understand how and when tasks are cleaned up in celery. From looking at the task docs I see that:

Old results will be cleaned automatically

1条回答
  •  再見小時候
    2021-02-08 09:20

    If you click on the link to the setting doc for CELERY_TASK_RESULT_EXPIRES:

    http://docs.celeryproject.org/en/latest/userguide/configuration.html#result-expires

    It does say that database supports this, but then you need to run celery beat (there's a default periodic task, called every day, to remove expired results).

    The backend docs in the task should probably mention this as well, maybe there should be a dedicated guide for backends too. If you want to lobby for this, then please open up an issue at https://github.com/celery/celery/issues

    0 讨论(0)
提交回复
热议问题