2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-14 09:14:04 +00:00

refactor: check_supervisord_config

This commit is contained in:
Gavin D'souza 2022-08-04 12:15:51 +05:30
parent db13ce3732
commit f734eef7a7
3 changed files with 5 additions and 5 deletions

View File

@ -58,7 +58,7 @@ def reload_nginx():
def setup_supervisor(user=None, yes=False, skip_redis=False, skip_supervisord=False):
from bench.utils import get_cmd_output
from bench.config.supervisor import (
update_supervisord_config,
check_supervisord_config,
generate_supervisor_config,
)
@ -67,7 +67,7 @@ def setup_supervisor(user=None, yes=False, skip_redis=False, skip_supervisord=Fa
if not skip_supervisord and "Permission denied" in get_cmd_output(
"supervisorctl status"
):
update_supervisord_config(user=user)
check_supervisord_config(user=user)
generate_supervisor_config(bench_path=".", user=user, yes=yes, skip_redis=skip_redis)

View File

@ -9,7 +9,7 @@ import bench
from bench.config.nginx import make_nginx_conf
from bench.config.supervisor import (
generate_supervisor_config,
update_supervisord_config,
check_supervisord_config,
)
from bench.config.systemd import generate_systemd_config
from bench.bench import Bench
@ -48,7 +48,7 @@ def setup_production(user, bench_path=".", yes=False):
generate_systemd_config(bench_path=bench_path, user=user, yes=yes)
else:
print("Setting Up supervisor...")
update_supervisord_config(user=user)
check_supervisord_config(user=user)
generate_supervisor_config(bench_path=bench_path, user=user, yes=yes)
print("Setting Up NGINX...")

View File

@ -79,7 +79,7 @@ def get_supervisord_conf():
return possibility
def update_supervisord_config(user=None):
def check_supervisord_config(user=None):
"""From bench v5.x, we're moving to supervisor running as user"""
# i don't think bench should be responsible for this but we're way past this now...
# removed updating supervisord conf & reload in Aug 2022 - gavin@frappe.io