mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +00:00
refactor: check_supervisord_config
This commit is contained in:
parent
db13ce3732
commit
f734eef7a7
@ -58,7 +58,7 @@ def reload_nginx():
|
|||||||
def setup_supervisor(user=None, yes=False, skip_redis=False, skip_supervisord=False):
|
def setup_supervisor(user=None, yes=False, skip_redis=False, skip_supervisord=False):
|
||||||
from bench.utils import get_cmd_output
|
from bench.utils import get_cmd_output
|
||||||
from bench.config.supervisor import (
|
from bench.config.supervisor import (
|
||||||
update_supervisord_config,
|
check_supervisord_config,
|
||||||
generate_supervisor_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(
|
if not skip_supervisord and "Permission denied" in get_cmd_output(
|
||||||
"supervisorctl status"
|
"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)
|
generate_supervisor_config(bench_path=".", user=user, yes=yes, skip_redis=skip_redis)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import bench
|
|||||||
from bench.config.nginx import make_nginx_conf
|
from bench.config.nginx import make_nginx_conf
|
||||||
from bench.config.supervisor import (
|
from bench.config.supervisor import (
|
||||||
generate_supervisor_config,
|
generate_supervisor_config,
|
||||||
update_supervisord_config,
|
check_supervisord_config,
|
||||||
)
|
)
|
||||||
from bench.config.systemd import generate_systemd_config
|
from bench.config.systemd import generate_systemd_config
|
||||||
from bench.bench import Bench
|
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)
|
generate_systemd_config(bench_path=bench_path, user=user, yes=yes)
|
||||||
else:
|
else:
|
||||||
print("Setting Up supervisor...")
|
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)
|
generate_supervisor_config(bench_path=bench_path, user=user, yes=yes)
|
||||||
|
|
||||||
print("Setting Up NGINX...")
|
print("Setting Up NGINX...")
|
||||||
|
@ -79,7 +79,7 @@ def get_supervisord_conf():
|
|||||||
return possibility
|
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"""
|
"""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...
|
# 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
|
# removed updating supervisord conf & reload in Aug 2022 - gavin@frappe.io
|
||||||
|
Loading…
Reference in New Issue
Block a user