Workers ttl

This commit is contained in:
Luciano Gervasoni
2025-07-14 23:37:48 +02:00
parent 623dfbf95a
commit 6c88759e7b
3 changed files with 6 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ class PPIDFilter(logging.Filter):
logging.basicConfig(format='%(filename)s | PPID=%(ppid)s | %(levelname)s | %(asctime)s | %(message)s')
logger = logging.getLogger("fetcher")
logger.setFormatter(logging.Formatter('%(levelname)s | PPID=%(ppid)s | %(asctime)s | %(message)s'))
logger.addFilter(PPIDFilter())
logger.setLevel(logging.DEBUG)

View File

@@ -6,5 +6,5 @@ if [ "${DJANGO_DEBUG}" = true ] | [ "${DJANGO_DEBUG}" == "True" ]; then
else
echo "Running in PROD mode"
# Multi-worker
gunicorn core.wsgi:application --bind 0.0.0.0:8000 --timeout 600 & python manage.py scheduler_worker default high & python manage.py scheduler_worker low
gunicorn core.wsgi:application --bind 0.0.0.0:8000 --timeout 86400 & python manage.py scheduler_worker --worker-ttl 86400 default high & python manage.py scheduler_worker --worker-ttl 86400 low
fi

View File

@@ -61,8 +61,8 @@
"result_ttl": 86400,
"cron_string": null,
"scheduled_time": "2025-01-01T00:00:00+00:00",
"interval": 4,
"interval_unit": "hours",
"interval": 1,
"interval_unit": "days",
"successful_runs": 0,
"failed_runs": 0,
"last_successful_run": null,
@@ -240,14 +240,14 @@
"callable_args": [],
"callable_kwargs": [],
"enabled": false,
"queue": "default",
"queue": "low",
"repeat": null,
"at_front": false,
"timeout": 1800,
"result_ttl": 86400,
"cron_string": null,
"scheduled_time": "2025-01-01T00:00:00+00:00",
"interval": 4,
"interval": 12,
"interval_unit": "hours",
"successful_runs": 0,
"failed_runs": 0,