There is a project, in it, in one of the applications there are signals and tasks, in the tasks.py and signals.py
When in apps.py I do this:
from django.apps import AppConfig class MyAppConfig(AppConfig): name = 'proj.myapp' verbose_name = "MyApp" def ready(self): import proj.myapp.signals then running celery -A proj.taskapp worker -B -E -l info displays:
[tasks] . gglobal.taskapp.celery.debug_task that is, my tasks from proj/myapp/tasks.py not registered.
However, if I am def ready(self): I write pass , that is, I don’t import signals as in the example above, then all my tasks from proj/myapp/tasks.py are logged normally.
What could be the problem ?
ADDITION
at the same time, so:
def ready(self): import proj.myapp.tasks import proj.myapp.signals it works, and here it is:
def ready(self): import proj.myapp.signals import proj.myapp.tasks not