解决办法:
在项目 proj/proj/celery.py文件中,看到下面这行配置:
celery_app.config_from_object('django.conf:settings', namespace='CELERY')
修改成下面所示结果:
celery_app.config_from_object(settings, namespace='CELERY')
除此之外,还需要在proj/proj/celery.py文件头部引入settings配置:
from django.conf import settings
参考链接:
shared_task defined in custom apps not showing up in registered tasks in periodic tasks admin page