Is there a working rc-script for Celery on FreeBSD?
I have hacked together an rc script for celeryd on FreeBSD, but I can't help but think that there must be a better way. celeryd
does not d开发者_如何转开发aemonize itself, and it seems to have a hard time responding to sigterm as well, so it might be complicated to get to work.
Is this a problem that someone else has solved before?
There's an experimental init.d script here: https://github.com/ask/celery/tree/master/contrib/generic-init.d/
I don't know if it has been tested on FreeBSD, but it should definitely be made to work there.
What do you mean celeryd isn't responding to TERM
? This is the recommended signal
to use for a clean shutdown as it will finish any currently running tasks.
(there's no time out, so it doesn't help if you have a task in deadlock, for that you may
use the --time-limit argument)
Here's the /etc/default/celeryd
file I use (it's for a Django project, for others just replace manage.py celeryd
with celeryd
):
http://pastie.org/1216111
celerybeat
/celeryevcam
is using the scripts from contrib/debian/init.d
, there are no generic versions of these yet.
精彩评论