2๐
โ
I was struggling with the issue. While I didnโt go the launchd route, I eventually got daemonized workers using the daemonize utility.
http://software.clapper.org/daemonize/
You can easily install it with brew.
Then using Fabric I can restart the workers like so:
def celeryd():
with cd('/usr/local/Cellar/daemonize/1.7.4/sbin'):
# Kill existing workers
sudo('ps auxww | grep celeryd | grep -v "grep" | awk \'{print $2}\' | xargs kill')
# Create new workers
sudo('daemonize -u pipeadmin %s/manage.py celery worker' % siteDir)
๐คChad Vernon
Source:stackexchange.com