mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
fix supervisor, fix #16
This commit is contained in:
parent
efd1cc4105
commit
d4bef52e1f
@ -7,7 +7,7 @@ from .utils import setup_auto_update as _setup_auto_update
|
|||||||
from .utils import setup_sudoers as _setup_sudoers
|
from .utils import setup_sudoers as _setup_sudoers
|
||||||
from .utils import start as _start
|
from .utils import start as _start
|
||||||
from .utils import setup_procfile as _setup_procfile
|
from .utils import setup_procfile as _setup_procfile
|
||||||
from .utils import build_assets, patch_sites, exec_cmd, update_bench, get_frappe, setup_logging, get_config, update_config
|
from .utils import build_assets, patch_sites, exec_cmd, update_bench, get_frappe, setup_logging, get_config, update_config, restart_supervisor_processes
|
||||||
from .app import get_app as _get_app
|
from .app import get_app as _get_app
|
||||||
from .app import new_app as _new_app
|
from .app import new_app as _new_app
|
||||||
from .app import pull_all_apps
|
from .app import pull_all_apps
|
||||||
@ -84,12 +84,12 @@ def update(pull=False, patch=False, build=False, bench=False, auto=False, restar
|
|||||||
if build:
|
if build:
|
||||||
build_assets()
|
build_assets()
|
||||||
if restart_supervisor or conf.get('restart_supervisor_on_update'):
|
if restart_supervisor or conf.get('restart_supervisor_on_update'):
|
||||||
restart()
|
restart_supervisor_processes()
|
||||||
|
|
||||||
@click.command('restart')
|
@click.command('restart')
|
||||||
def restart():
|
def restart():
|
||||||
"Restart supervisor processes"
|
"Restart supervisor processes"
|
||||||
exec_cmd("sudo supervisorctl restart frappe:")
|
restart_supervisor_processes()
|
||||||
|
|
||||||
@click.command('start')
|
@click.command('start')
|
||||||
def start():
|
def start():
|
||||||
|
@ -163,3 +163,6 @@ def get_cmd_output(cmd, cwd='.'):
|
|||||||
except subprocess.CalledProcessError, e:
|
except subprocess.CalledProcessError, e:
|
||||||
print "Error:", e.output
|
print "Error:", e.output
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
def restart_supervisor_processes():
|
||||||
|
exec_cmd("sudo supervisorctl restart frappe:")
|
||||||
|
Loading…
Reference in New Issue
Block a user