From 6365a208b4e31e99f6266876a8698cc02f4f076b Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Fri, 23 May 2014 15:06:23 -0400 Subject: [PATCH] Improve celery wrapper script --- celerywrapper.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) mode change 100644 => 100755 celerywrapper.sh 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 -- 2.25.1