[Solved]-Django Signals in celery

21👍

Django signals are local, which means that the signal handler must be registered in the worker as well.

If your signal handler is connected in e.g. models.py, then you need to import that
in tasks.py to make sure it’s also connected in the worker.

Alternatively you can specify additional modules the worker should import using
the CELERY_IMPORTS setting:

CELERY_IMPORTS = ("myapp.handlers", )

or the -I argument to celeryd.

$ python manage.py celeryd -I myapp.handlers
👤asksol

Leave a comment