2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

[fix] supervisor restart

This commit is contained in:
Anand Doshi 2016-04-20 17:13:40 +05:30
parent 4d9000167c
commit ccea825d4c

View File

@ -272,12 +272,13 @@ def restart_supervisor_processes(bench='.'):
conf = get_config(bench=bench)
bench_name = get_bench_name(bench)
cmd = conf.get('supervisor_restart_cmd',
'sudo supervisorctl restart {bench_name}-processes:'.format(bench_name=bench_name))
'sudo supervisorctl restart {bench_name}-web: {bench_name}-workers:'.format(bench_name=bench_name))
try:
exec_cmd(cmd, cwd=bench)
except CommandFailedError:
if cmd.endswith('{bench_name}-processes:'.format(bench_name=bench_name)):
if '{bench_name}-workers:'.format(bench_name=bench_name) in cmd:
# backward compatibility
exec_cmd('sudo supervisorctl restart frappe:', cwd=bench)
else: