Celery: auto discovery does not find tasks module in app
celery, django, django-celery, python
Solution
This was a bug in django-celery 2.5.4, please upgrade to 2.5.5!
Problem
I have the following setup with a fresh installed celery and django 1.4: settings.py: ``` import djcelery djcelery.setup_loader() BROKER_HOST = 'localhost' BROKER_PORT = 5672 BROKER_USER = 'user' BROKER_PASSWORD = 'password' BROKER_VHOST = 'test' [...] INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.staticfiles', 'djcelery', 'south', 'compressor', 'testapp', ] ``` testapp/tasks.py: ``` from celery.task import task @task() def add(x, y): return x + y ``` Message delivery to the celeryd works fine, but the task is always unregistered (so auto discovery does not seem to work correctly here). Only if I import the tasks module in `tasks/__init__.py` the task is found and I can use it. Also the documentation was a little confusing about the decorator import, but I think this is the right one now. Where is the bug in my setup?