Monday, November 30, 2015

Capture and save celery tasks information into the database in your Django project

In my experience, It's a good idea that you can store the celery tasks information into the database so you can have a better idea about what going in the background without touching the enormous logs pool. Here is how easy it is to do it:

1. In your Django project's

CELERY_RESULT_BACKEND = 'db+mysql://mydbuser:mydbpasswd@localhost/mydb'

2. Along side with celeryd, you need to run the celerycam app:

(venv)$ ./ celerycam

3. And then in your Django admin's dashboard, go to tasks under Djcelery section and enjoy the greatness: