Skip to main content

add_backend_cleanup_task

Task used to clean up expired results.

If the configured backend requires periodic cleanup this task is also
automatically configured to run every day at 4am (requires
:program:`celery beat` to be running).
def add_backend_cleanup_task(
app: Celery
) - > function

Task used to clean up expired results. If the configured backend requires periodic cleanup this task is also automatically configured to run every day at 4am (requires :program:celery beat to be running).

Parameters

NameTypeDescription
appCeleryThe Celery application instance where the cleanup task will be registered and whose backend will be cleaned.

Returns

TypeDescription
functionThe decorated backend_cleanup task function which triggers the backend's cleanup process when executed.