1

I have an app that uses celery and django to run distributed tasks (like send email, crawl web,etc).

The app never was in prod, so I always start celeryd with ./manage celeryd.

I want to setup a pre-post env in linux, and I will need information in how to make an init.d script for start the celeryd for django. (I had made some init.d scripts before, no need complete script just relevant part)

Thanks!

1 Answer 1

1

Use supervisord, it is superior to self-made sys-v-init scripts when it comes to manage several different processes. Celery ships with example configuration files that you can use to integrate it nicely into supervisord.

If you happen to use Debian as your choice of distribution you can even use the prepackaged supervisor:

aptitude install supervisor

For an example on how to use the "django-admin" command from the Debian python-django package with supervisor take a look at this blog post of mine.

2
  • If you're running in production, you should probably look at deploying with FastCGI or mod_python rather than the built-in Django development server? I've never used Celery, but I know that it's usually a Bad Idea (tm) to deploy the dev. server into production.
    – McJeff
    Mar 24, 2010 at 15:04
  • This has nothing to do with the Django webserver. The celery worker server is a proccess that uses AMQP for asynchronous workload processing. It has no connection to FastCGI or mod_python or any other web-frontend system. If it comes to Django production servers I would strongly advise to use mod_wsgi.
    – Fladi
    Mar 25, 2010 at 8:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .