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

Merge pull request #975 from Thunderbottom/skip-restart-on-setup-req

chore: skip restart on bench setup requirements
This commit is contained in:
gavin 2020-05-21 11:08:19 +05:30 committed by GitHub
commit 89dd9721c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -90,7 +90,7 @@ def remove_from_excluded_apps_txt(app, bench_path='.'):
apps.remove(app)
return write_excluded_apps_txt(apps, bench_path=bench_path)
def get_app(git_url, branch=None, bench_path='.', skip_assets=False, verbose=False, postprocess=True, overwrite=False):
def get_app(git_url, branch=None, bench_path='.', skip_assets=False, verbose=False, restart_bench=True, overwrite=False):
if not os.path.exists(git_url):
if not is_git_url(git_url):
orgs = ['frappe', 'erpnext']
@ -164,7 +164,7 @@ def new_app(app, bench_path='.'):
install_app(app, bench_path=bench_path)
def install_app(app, bench_path=".", verbose=False, no_cache=False, postprocess=True, skip_assets=False):
def install_app(app, bench_path=".", verbose=False, no_cache=False, restart_bench=True, skip_assets=False):
print('\n{0}Installing {1}{2}'.format(color.yellow, app, color.nc))
logger.log("installing {}".format(app))
@ -180,9 +180,10 @@ def install_app(app, bench_path=".", verbose=False, no_cache=False, postprocess=
add_to_appstxt(app, bench_path=bench_path)
if postprocess:
if not skip_assets:
build_assets(bench_path=bench_path, app=app)
if not skip_assets:
build_assets(bench_path=bench_path, app=app)
if restart_bench:
conf = get_config(bench_path=bench_path)
if conf.get('restart_supervisor_on_update'):

View File

@ -284,7 +284,7 @@ def clone_apps_from(bench_path, clone_from, update_app=True):
subprocess.check_output(['git', 'reset', '--hard'], cwd=app_path)
subprocess.check_output(['git', 'pull', '--rebase', remote, branch], cwd=app_path)
install_app(app, bench_path)
install_app(app, bench_path, restart_bench=False)
with open(os.path.join(clone_from, 'sites', 'apps.txt'), 'r') as f:
apps = f.read().splitlines()
@ -578,7 +578,7 @@ def update_requirements(bench_path='.'):
update_env_pip(bench_path)
for app in get_apps():
install_app(app, bench_path=bench_path, skip_assets=True)
install_app(app, bench_path=bench_path, skip_assets=True, restart_bench=False)
def update_python_packages(bench_path='.'):