2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 09:02:10 +00:00

[fix] bench command path in supervisor

This commit is contained in:
Anand Doshi 2016-06-16 10:21:03 +05:30
parent 47b65ec28f
commit 47662c4d90
2 changed files with 6 additions and 5 deletions

View File

@ -29,7 +29,8 @@ def generate_supervisor_config(bench_path, user=None, force=False):
"webserver_port": config.get('webserver_port', 8000),
"gunicorn_workers": config.get('gunicorn_workers', get_gunicorn_workers()["gunicorn_workers"]),
"bench_name": get_bench_name(bench_path),
"background_workers": config.get('background_workers') or 1
"background_workers": config.get('background_workers') or 1,
"bench_cmd": find_executable('bench')
})
conf_path = os.path.join(bench_path, 'config', 'supervisor.conf')

View File

@ -14,7 +14,7 @@ directory={{ sites_dir }}
{% if use_rq %}
[program:{{ bench_name }}-frappe-schedule]
command=bench schedule
command={{ bench_cmd }} schedule
priority=3
autostart=true
autorestart=true
@ -24,7 +24,7 @@ user={{ user }}
directory={{ bench_dir }}
[program:{{ bench_name }}-frappe-default-worker]
command=bench worker --queue default
command={{ bench_cmd }} worker --queue default
priority=4
autostart=true
autorestart=true
@ -38,7 +38,7 @@ numprocs={{ background_workers }}
process_name=%(program_name)s-%(process_num)d
[program:{{ bench_name }}-frappe-short-worker]
command=bench worker --queue short
command={{ bench_cmd }} worker --queue short
priority=4
autostart=true
autorestart=true
@ -52,7 +52,7 @@ numprocs={{ background_workers }}
process_name=%(program_name)s-%(process_num)d
[program:{{ bench_name }}-frappe-long-worker]
command=bench worker --queue long
command={{ bench_cmd }} worker --queue long
priority=4
autostart=true
autorestart=true