From e22ea566dd29c238a59fbbf484f252e62b94d30b Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Wed, 10 Sep 2014 16:50:17 +0530 Subject: [PATCH] restart supervisor processes if configured after getting an app --- bench/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bench/app.py b/bench/app.py index 44a9892c..12eef2c5 100644 --- a/bench/app.py +++ b/bench/app.py @@ -1,5 +1,5 @@ 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 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')) install_app(app, 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='.'): logger.info('creating new app {}'.format(app))