Is it possible to set a different database to be used with Django Celery?
I have a project with multiple databases in configuration and don’t want Django Celery to use the default one.
I will be nice if I can still use django celery admin pages and read results stored in this different database 🙂
It should be possible to set up a separate database for the django-celery models using Django database routers:
https://docs.djangoproject.com/en/1.4/topics/db/multi-db/#automatic-database-routing
I haven’t tested this specifically with django-celery, but if it doesn’t work for some reason, then it’s a bug in django-celery (or Django itself) that should be fixed.
Your router would look something like this:
Then add this to your settings: