[Solved]-Celery does not registering tasks

10👍

As @MuhammadShoaib wrote, it’s just one thing:

from django.apps import apps 

app.config_from_object(settings)
app.autodiscover_tasks(lambda: [n.name for n in apps.get_app_configs()])

instead of

app.autodiscover_tasks()

why this is not in the documentation?…

8👍

This might hopefully help someone.
I modified my code and neglected to restart the celery worker.
Restarting the celery workers helped.

Leave a comment