Django Apps aren't loaded yet Celery Tasks
Try adding this to the beginning of tasks.py
:
import django
django.setup()
Ok - after posting your celery app files I compared to what I have and tried running. Think I found your issue - it looks like you're calling tasks.py in celery -A demo.apps.wall.tasks
.
If your wall module contains celery.py, and tasks.py - you should call celery -A demo.apps.wall
.
Here's the directory structure I have, and the celery command I run:
django_project
- an_app
- celery_tasks
- init.py
- celery_app.py (celery.py in your case)
- tasks.py
The command I run: celery worker -A celery_tasks
from the django_project directory.