Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
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 '10 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 '10 at 8:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.