2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-24 15:38:25 +00:00

make supervisor restart command configurable

This commit is contained in:
Pratik Vyas 2014-09-03 12:15:30 +05:30
parent 185a55d4ce
commit 645615950e

View File

@ -193,8 +193,10 @@ def get_cmd_output(cmd, cwd='.'):
print "Error:", e.output
raise
def restart_supervisor_processes():
exec_cmd("sudo supervisorctl restart frappe:")
def restart_supervisor_processes(bench='.'):
conf = get_config(bench=bench)
cmd = conf.get('supervisor_restart_cmd', 'sudo supervisorctl restart frappe:')
exec_cmd(cmd, cwd=bench)
def get_site_config(site, bench='.'):
config_path = os.path.join(bench, 'sites', site, 'site_config.json')