13 lines
638 B
Bash
Executable File
13 lines
638 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ "${DJANGO_DEBUG}" = true ] | [ "${DJANGO_DEBUG}" == "True" ]; then
|
|
echo "Running in DEBUG mode"
|
|
gunicorn core.wsgi:application --reload --log-level debug --bind 0.0.0.0:8000 --timeout 600 & python manage.py scheduler_worker high default low
|
|
else
|
|
echo "Running in PROD mode"
|
|
# Multi-worker
|
|
gunicorn core.wsgi:application --bind 0.0.0.0:8000 --timeout 86400 & \
|
|
python manage.py scheduler_worker -v 3 --traceback --worker-ttl 86400 default high >> /opt/logs/warning.log 2>&1 & \
|
|
python manage.py scheduler_worker -v 3 --traceback --worker-ttl 86400 low >> /opt/logs/warning.log 2>&1
|
|
fi
|