2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-11 15:51:03 +00:00

[fix] post-upgrade

This commit is contained in:
Anand Doshi 2015-08-17 13:21:16 +05:30
parent 0e0ac03f8c
commit 35e58a7c2e
2 changed files with 15 additions and 12 deletions

View File

@ -270,10 +270,10 @@ def update(pull=False, patch=False, build=False, bench=False, auto=False, restar
patch_sites(bench=bench_path)
if build:
build_assets(bench=bench_path)
if restart_supervisor or conf.get('restart_supervisor_on_update'):
restart_supervisor_processes(bench=bench_path)
if upgrade:
post_upgrade(version_upgrade[0], version_upgrade[1], bench=bench_path)
if restart_supervisor or conf.get('restart_supervisor_on_update'):
restart_supervisor_processes(bench=bench_path)
print "_"*80
print "Bench: Open source installer + admin for Frappe and ERPNext (https://erpnext.com)"

View File

@ -516,24 +516,27 @@ def pre_upgrade(from_ver, to_ver, bench='.'):
def post_upgrade(from_ver, to_ver, bench='.'):
from .config import generate_nginx_config, generate_supervisor_config, generate_redis_cache_config, generate_redis_async_broker_config
conf = get_config(bench=bench)
if from_ver == 4 and to_ver == 5:
print "-"*80
print "Your bench was upgraded to version 5"
if conf.get('restart_supervisor_on_update'):
print "-"*80
print "Your bench was upgraded to version {0}".format(to_ver)
if conf.get('restart_supervisor_on_update'):
if from_ver == 4 and to_ver == 5:
generate_redis_cache_config(bench=bench)
generate_supervisor_config(bench=bench)
generate_nginx_config(bench=bench)
setup_procfile(bench=bench)
setup_backups(bench=bench)
print "As you have setup your bench for production, you will have to reload configuration for nginx and supervisor"
print "To complete the migration, please run the following commands"
print
print "sudo service nginx restart"
print "sudo supervisorctl reload"
if from_ver <= 5 and to_ver == 6:
if from_ver <= 5 and to_ver == 6:
generate_redis_cache_config(bench=bench)
generate_redis_async_broker_config(bench=bench)
print "As you have setup your bench for production, you will have to reload configuration for nginx and supervisor"
print "To complete the migration, please run the following commands"
print
print "sudo service nginx restart"
print "sudo supervisorctl reload"
def update_translations_p(args):
update_translations(*args)