Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Celery with Django - deployment

I am considering using celery in my project. I found a lot of information about how to use it etc. What I am interested in is how to deploy/package my solution.

I need to run two components - django app and then celeryd worker (component that sends emails). For example I would like my django app to use email_ticket task that would email support tickets. I create tasks.py in the django app.

@task
def email_ticket(from, message):
...

Do I deploy my django app and then just run celeryd as separate process from the same path?

./manage.py celeryd ...

What about workers on different servers? Deploy whole django application and run only celeryd? I understand I could use celery only for the worker, but I would like to use celerycam and celerybeat.

Any feedback is appreciated. Thanks

Thanks for any feedback.

like image 522
Tomas Avatar asked Jan 26 '11 00:01

Tomas


1 Answers

This is covered in the documentation here. The gist is you need to download some init scripts and setup some config. Once that's done celeryd will start on boot and you'll be off and running.

like image 183
Ted Carroll Avatar answered Oct 05 '22 05:10

Ted Carroll