Workers ttl
This commit is contained in:
@@ -15,6 +15,7 @@ class PPIDFilter(logging.Filter):
|
|||||||
|
|
||||||
logging.basicConfig(format='%(filename)s | PPID=%(ppid)s | %(levelname)s | %(asctime)s | %(message)s')
|
logging.basicConfig(format='%(filename)s | PPID=%(ppid)s | %(levelname)s | %(asctime)s | %(message)s')
|
||||||
logger = logging.getLogger("fetcher")
|
logger = logging.getLogger("fetcher")
|
||||||
|
logger.setFormatter(logging.Formatter('%(levelname)s | PPID=%(ppid)s | %(asctime)s | %(message)s'))
|
||||||
logger.addFilter(PPIDFilter())
|
logger.addFilter(PPIDFilter())
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ if [ "${DJANGO_DEBUG}" = true ] | [ "${DJANGO_DEBUG}" == "True" ]; then
|
|||||||
else
|
else
|
||||||
echo "Running in PROD mode"
|
echo "Running in PROD mode"
|
||||||
# Multi-worker
|
# 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
|
fi
|
||||||
|
|||||||
@@ -61,8 +61,8 @@
|
|||||||
"result_ttl": 86400,
|
"result_ttl": 86400,
|
||||||
"cron_string": null,
|
"cron_string": null,
|
||||||
"scheduled_time": "2025-01-01T00:00:00+00:00",
|
"scheduled_time": "2025-01-01T00:00:00+00:00",
|
||||||
"interval": 4,
|
"interval": 1,
|
||||||
"interval_unit": "hours",
|
"interval_unit": "days",
|
||||||
"successful_runs": 0,
|
"successful_runs": 0,
|
||||||
"failed_runs": 0,
|
"failed_runs": 0,
|
||||||
"last_successful_run": null,
|
"last_successful_run": null,
|
||||||
@@ -240,14 +240,14 @@
|
|||||||
"callable_args": [],
|
"callable_args": [],
|
||||||
"callable_kwargs": [],
|
"callable_kwargs": [],
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"queue": "default",
|
"queue": "low",
|
||||||
"repeat": null,
|
"repeat": null,
|
||||||
"at_front": false,
|
"at_front": false,
|
||||||
"timeout": 1800,
|
"timeout": 1800,
|
||||||
"result_ttl": 86400,
|
"result_ttl": 86400,
|
||||||
"cron_string": null,
|
"cron_string": null,
|
||||||
"scheduled_time": "2025-01-01T00:00:00+00:00",
|
"scheduled_time": "2025-01-01T00:00:00+00:00",
|
||||||
"interval": 4,
|
"interval": 12,
|
||||||
"interval_unit": "hours",
|
"interval_unit": "hours",
|
||||||
"successful_runs": 0,
|
"successful_runs": 0,
|
||||||
"failed_runs": 0,
|
"failed_runs": 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user