I have a bash script that launches wsgi for python and celery as well. The pythib project launes nicely though celery does not work. Below i incluse two ways of invoking the wsgi project and celery and none works as expected.
Way No1
...
echo "the PWD of project now is : ${PWD}"
exec gunicorn project.wsgi:application \
--name audit_tool \
--bind 0.0.0.0:8000 \
--timeout 1000 \
--workers 4 \
--log-level=$level \
--env DEBUG=${DEBUG} \
--log-config tmp.conf \
--preload &&
echo "Gunicorn started"
exec celery -A project worker -Q celery --loglevel=info --concurrency=1 --max-memory-per-child=25000 &&
sleep 2.5
ps aux | grep celery ;
echo 'done'
...
read -r -d '' cmd << end
gunicorn project.wsgi:application \
--name audit_tool \
--bind 0.0.0.0:8000 \
--timeout 1000 \
--workers 6 \
--log-level=$level \
--env DEBUG=${DEBUG} \
--log-config tmp.conf \
--preload
end
echo Starting Gunicorn.
($cmd)
read -r -d '' cmd2 << end
celery \
-A project \
worker \
-Q celery \
--loglevel=info \
--concurrency=1 \
--max-memory-per-child=25000
end
echo "Starting celery."
($cmd2)
Any help would be appreciated !!
I tried the two above ways and expectation was to launch the wsgi project and celery as well.
execeverywhere.exec. When you say it doesn't work, what happens exactly?