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

restart supervisor processes if configured after getting an app

This commit is contained in:
Pratik Vyas 2014-09-10 16:50:17 +05:30
parent 86672c927a
commit e22ea566dd

View File

@ -1,5 +1,5 @@
import os import os
from .utils import exec_cmd, get_frappe, check_git_for_shallow_clone, get_config, build_assets from .utils import exec_cmd, get_frappe, check_git_for_shallow_clone, get_config, build_assets, restart_supervisor_processes
import logging import logging
import requests import requests
@ -27,6 +27,9 @@ def get_app(app, git_url, bench='.'):
exec_cmd("git clone {git_url} {shallow_clone} --origin upstream {app}".format(git_url=git_url, app=app, shallow_clone=shallow_clone), cwd=os.path.join(bench, 'apps')) exec_cmd("git clone {git_url} {shallow_clone} --origin upstream {app}".format(git_url=git_url, app=app, shallow_clone=shallow_clone), cwd=os.path.join(bench, 'apps'))
install_app(app, bench=bench) install_app(app, bench=bench)
build_assets(bench=bench) build_assets(bench=bench)
conf = get_config()
if conf.get('restart_supervisor_on_update'):
restart_supervisor_on_update(bench=bench)
def new_app(app, bench='.'): def new_app(app, bench='.'):
logger.info('creating new app {}'.format(app)) logger.info('creating new app {}'.format(app))