From: Charles Connell Date: Fri, 23 May 2014 19:06:23 +0000 (-0400) Subject: Improve celery wrapper script X-Git-Tag: release-20150131~33 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6365a208b4e31e99f6266876a8698cc02f4f076b;p=oweals%2Fkarmaworld.git Improve celery wrapper script --- diff --git a/celerywrapper.sh b/celerywrapper.sh old mode 100644 new mode 100755 index 7ae2289..4fe68a1 --- a/celerywrapper.sh +++ b/celerywrapper.sh @@ -1,3 +1,11 @@ #!/bin/bash python manage.py celery worker --pidfile=/tmp/celeryd.pid -l info & -python manage.py celery beat --pidfile=/tmp/beat.pid -l info & +sleep 5 +workerpid=`cat /tmp/celeryd.pid` +echo "Started celery worker with pid $workerpid" +python manage.py celery beat --pidfile=/tmp/celerybeat.pid -l info & +sleep 5 +beatpid=`cat /tmp/celerybeat.pid` +echo "Started celery beat with pid $beatpid" +wait $workerpid +wait $beatpid