celerywrapper.sh 356 B

1234567891011
  1. #!/bin/bash
  2. python manage.py celery worker --pidfile=/tmp/celeryd.pid -l info &
  3. sleep 5
  4. workerpid=`cat /tmp/celeryd.pid`
  5. echo "Started celery worker with pid $workerpid"
  6. python manage.py celery beat --pidfile=/tmp/celerybeat.pid -l info &
  7. sleep 5
  8. beatpid=`cat /tmp/celerybeat.pid`
  9. echo "Started celery beat with pid $beatpid"
  10. wait $workerpid
  11. wait $beatpid