From 7008273ecb66d7aeb420d747aa3c3d40a5965574 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 8 Feb 2016 17:07:46 +0530 Subject: [PATCH] [fix] added supervisor priority --- bench/templates/supervisor.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bench/templates/supervisor.conf b/bench/templates/supervisor.conf index 23450e1a..42a7a95a 100644 --- a/bench/templates/supervisor.conf +++ b/bench/templates/supervisor.conf @@ -1,5 +1,9 @@ +; Notes: +; Lower priorities indicate programs that start first and shut down last at startup and when aggregate commands are used + [program:frappe-web] command={{ bench_dir }}/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t {{http_timeout}} frappe.app:application +priority=2 autostart=true autorestart=true stdout_logfile={{ bench_dir }}/logs/web.log @@ -9,6 +13,7 @@ directory={{ sites_dir }} [program:frappe-worker] command={{ bench_dir }}/env/bin/python -m frappe.celery_app worker -n jobs@%%h --soft-time-limit 360 --time-limit 390 --loglevel INFO -Ofair +priority=2 autostart=true autorestart=true stdout_logfile={{ bench_dir }}/logs/worker.log @@ -19,6 +24,7 @@ directory={{ sites_dir }} [program:frappe-longjob-worker] command={{ bench_dir }}/env/bin/python -m frappe.celery_app worker -n longjobs@%%h --soft-time-limit 1500 --time-limit 1530 --loglevel INFO +priority=2 autostart=true autorestart=true stdout_logfile={{ bench_dir }}/logs/worker.log @@ -29,6 +35,7 @@ directory={{ sites_dir }} [program:frappe-async-worker] command={{ bench_dir }}/env/bin/python -m frappe.celery_app worker -n async@%%h --soft-time-limit 1500 --time-limit 1530 --loglevel INFO +priority=2 autostart=true autorestart=true stdout_logfile={{ bench_dir }}/logs/worker.log @@ -39,6 +46,7 @@ directory={{ sites_dir }} [program:frappe-workerbeat] command={{ bench_dir }}/env/bin/python -m frappe.celery_app beat -s beat.schedule +priority=2 autostart=true autorestart=true stdout_logfile={{ bench_dir }}/logs/workerbeat.log @@ -50,6 +58,7 @@ directory={{ sites_dir }} {% if frappe_version > 4%} [program:redis-cache] command={{ redis_server }} {{ redis_cache_config }} +priority=1 autostart=true autorestart=true stdout_logfile={{ bench_dir }}/logs/redis-cache.log @@ -61,6 +70,7 @@ directory={{ sites_dir }} {% if frappe_version > 5%} [program:redis-async-broker] command={{ redis_server }} {{ redis_async_broker_config }} +priority=1 autostart=true autorestart=true stdout_logfile={{ bench_dir }}/logs/redis-async-broker.log @@ -71,6 +81,7 @@ directory={{ sites_dir }} {% if node %} [program:node-socketio] command={{ node }} {{ bench_dir }}/apps/frappe/socketio.js +priority=2 autostart=true autorestart=true stdout_logfile={{ bench_dir }}/logs/node-socketio.log