Files
matitos_news/app_urls/run.sh
Luciano Gervasoni 9d79a4e5c4 Workers fix
2025-07-15 01:04:57 +02:00

11 lines
576 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 2 --fork-job-execution --worker-ttl 86400 default high & python manage.py scheduler_worker -v 2 --fork-job-execution --worker-ttl 86400 low
fi