From 0afb89a2c178b0c8a90a1f080bb79e9f75a348e4 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Thu, 13 Dec 2018 09:49:55 +0530 Subject: [PATCH] fix: default caching of pip packages, use reload_supervisor function --- bench/app.py | 2 +- bench/config/production_setup.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bench/app.py b/bench/app.py index 081c542b..44c41a38 100755 --- a/bench/app.py +++ b/bench/app.py @@ -174,7 +174,7 @@ def install_app(app, bench_path='.', verbose=False, no_cache=False): exec_cmd("{pip} install {quiet} {find_links} -e {app} {no_cache}".format( pip=os.path.join(bench_path, 'env', 'bin', 'pip'), quiet="-q" if not verbose else "", - no_cache='--no-cache-dir' if not no_cache else '', + no_cache='--no-cache-dir' if no_cache else '', app=os.path.join(bench_path, 'apps', app), find_links=find_links)) add_to_appstxt(app, bench_path=bench_path) diff --git a/bench/config/production_setup.py b/bench/config/production_setup.py index 026d78bc..8b2e7801 100755 --- a/bench/config/production_setup.py +++ b/bench/config/production_setup.py @@ -52,8 +52,7 @@ def disable_production(bench_path='.'): os.unlink(supervisor_conf) if get_config(bench_path).get('restart_supervisor_on_update'): - exec_cmd('sudo supervisorctl reread') - exec_cmd('sudo supervisorctl update') + reload_supervisor() # nginx nginx_conf = '/etc/nginx/conf.d/{bench_name}.conf'.format(bench_name=bench_name)