mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
feat: set startretries
in supervisor configuration
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
9460a46ac3
commit
deadc7c7c2
@ -59,6 +59,7 @@ def generate_supervisor_config(bench_path, user=None, yes=False, skip_redis=Fals
|
|||||||
"skip_redis": skip_redis,
|
"skip_redis": skip_redis,
|
||||||
"workers": config.get("workers", {}),
|
"workers": config.get("workers", {}),
|
||||||
"multi_queue_consumption": can_enable_multi_queue_consumption(bench_path),
|
"multi_queue_consumption": can_enable_multi_queue_consumption(bench_path),
|
||||||
|
"supervisor_startretries": 10,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ stopwaitsecs=40
|
|||||||
killasgroup=true
|
killasgroup=true
|
||||||
user={{ user }}
|
user={{ user }}
|
||||||
directory={{ sites_dir }}
|
directory={{ sites_dir }}
|
||||||
|
startretries={{ supervisor_startretries }}
|
||||||
|
|
||||||
[program:{{ bench_name }}-frappe-schedule]
|
[program:{{ bench_name }}-frappe-schedule]
|
||||||
command={{ bench_cmd }} schedule
|
command={{ bench_cmd }} schedule
|
||||||
@ -24,6 +25,7 @@ stdout_logfile={{ bench_dir }}/logs/schedule.log
|
|||||||
stderr_logfile={{ bench_dir }}/logs/schedule.error.log
|
stderr_logfile={{ bench_dir }}/logs/schedule.error.log
|
||||||
user={{ user }}
|
user={{ user }}
|
||||||
directory={{ bench_dir }}
|
directory={{ bench_dir }}
|
||||||
|
startretries={{ supervisor_startretries }}
|
||||||
|
|
||||||
{% if not multi_queue_consumption %}
|
{% if not multi_queue_consumption %}
|
||||||
[program:{{ bench_name }}-frappe-default-worker]
|
[program:{{ bench_name }}-frappe-default-worker]
|
||||||
@ -39,6 +41,7 @@ directory={{ bench_dir }}
|
|||||||
killasgroup=true
|
killasgroup=true
|
||||||
numprocs={{ background_workers }}
|
numprocs={{ background_workers }}
|
||||||
process_name=%(program_name)s-%(process_num)d
|
process_name=%(program_name)s-%(process_num)d
|
||||||
|
startretries={{ supervisor_startretries }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
[program:{{ bench_name }}-frappe-short-worker]
|
[program:{{ bench_name }}-frappe-short-worker]
|
||||||
@ -54,6 +57,7 @@ directory={{ bench_dir }}
|
|||||||
killasgroup=true
|
killasgroup=true
|
||||||
numprocs={{ background_workers }}
|
numprocs={{ background_workers }}
|
||||||
process_name=%(program_name)s-%(process_num)d
|
process_name=%(program_name)s-%(process_num)d
|
||||||
|
startretries={{ supervisor_startretries }}
|
||||||
|
|
||||||
[program:{{ bench_name }}-frappe-long-worker]
|
[program:{{ bench_name }}-frappe-long-worker]
|
||||||
command={{ bench_cmd }} worker --queue long{{',default,short' if multi_queue_consumption else ''}}
|
command={{ bench_cmd }} worker --queue long{{',default,short' if multi_queue_consumption else ''}}
|
||||||
@ -68,6 +72,7 @@ directory={{ bench_dir }}
|
|||||||
killasgroup=true
|
killasgroup=true
|
||||||
numprocs={{ background_workers }}
|
numprocs={{ background_workers }}
|
||||||
process_name=%(program_name)s-%(process_num)d
|
process_name=%(program_name)s-%(process_num)d
|
||||||
|
startretries={{ supervisor_startretries }}
|
||||||
|
|
||||||
{% for worker_name, worker_details in workers.items() %}
|
{% for worker_name, worker_details in workers.items() %}
|
||||||
[program:{{ bench_name }}-frappe-{{ worker_name }}-worker]
|
[program:{{ bench_name }}-frappe-{{ worker_name }}-worker]
|
||||||
@ -83,6 +88,7 @@ directory={{ bench_dir }}
|
|||||||
killasgroup=true
|
killasgroup=true
|
||||||
numprocs={{ worker_details["background_workers"] or background_workers }}
|
numprocs={{ worker_details["background_workers"] or background_workers }}
|
||||||
process_name=%(program_name)s-%(process_num)d
|
process_name=%(program_name)s-%(process_num)d
|
||||||
|
startretries={{ supervisor_startretries }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
@ -96,6 +102,7 @@ stdout_logfile={{ bench_dir }}/logs/redis-cache.log
|
|||||||
stderr_logfile={{ bench_dir }}/logs/redis-cache.error.log
|
stderr_logfile={{ bench_dir }}/logs/redis-cache.error.log
|
||||||
user={{ user }}
|
user={{ user }}
|
||||||
directory={{ sites_dir }}
|
directory={{ sites_dir }}
|
||||||
|
startretries={{ supervisor_startretries }}
|
||||||
|
|
||||||
[program:{{ bench_name }}-redis-queue]
|
[program:{{ bench_name }}-redis-queue]
|
||||||
command={{ redis_server }} {{ redis_queue_config }}
|
command={{ redis_server }} {{ redis_queue_config }}
|
||||||
@ -106,6 +113,7 @@ stdout_logfile={{ bench_dir }}/logs/redis-queue.log
|
|||||||
stderr_logfile={{ bench_dir }}/logs/redis-queue.error.log
|
stderr_logfile={{ bench_dir }}/logs/redis-queue.error.log
|
||||||
user={{ user }}
|
user={{ user }}
|
||||||
directory={{ sites_dir }}
|
directory={{ sites_dir }}
|
||||||
|
startretries={{ supervisor_startretries }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if node %}
|
{% if node %}
|
||||||
@ -118,6 +126,7 @@ stdout_logfile={{ bench_dir }}/logs/node-socketio.log
|
|||||||
stderr_logfile={{ bench_dir }}/logs/node-socketio.error.log
|
stderr_logfile={{ bench_dir }}/logs/node-socketio.error.log
|
||||||
user={{ user }}
|
user={{ user }}
|
||||||
directory={{ bench_dir }}
|
directory={{ bench_dir }}
|
||||||
|
startretries={{ supervisor_startretries }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
[group:{{ bench_name }}-web]
|
[group:{{ bench_name }}-web]
|
||||||
|
Loading…
Reference in New Issue
Block a user