mirror of
https://github.com/frappe/bench.git
synced 2024-11-14 09:14:04 +00:00
[fix] post-upgrade
This commit is contained in:
parent
0e0ac03f8c
commit
35e58a7c2e
@ -270,10 +270,10 @@ def update(pull=False, patch=False, build=False, bench=False, auto=False, restar
|
|||||||
patch_sites(bench=bench_path)
|
patch_sites(bench=bench_path)
|
||||||
if build:
|
if build:
|
||||||
build_assets(bench=bench_path)
|
build_assets(bench=bench_path)
|
||||||
if restart_supervisor or conf.get('restart_supervisor_on_update'):
|
|
||||||
restart_supervisor_processes(bench=bench_path)
|
|
||||||
if upgrade:
|
if upgrade:
|
||||||
post_upgrade(version_upgrade[0], version_upgrade[1], bench=bench_path)
|
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 "_"*80
|
||||||
print "Bench: Open source installer + admin for Frappe and ERPNext (https://erpnext.com)"
|
print "Bench: Open source installer + admin for Frappe and ERPNext (https://erpnext.com)"
|
||||||
|
@ -516,23 +516,26 @@ def pre_upgrade(from_ver, to_ver, bench='.'):
|
|||||||
def post_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
|
from .config import generate_nginx_config, generate_supervisor_config, generate_redis_cache_config, generate_redis_async_broker_config
|
||||||
conf = get_config(bench=bench)
|
conf = get_config(bench=bench)
|
||||||
if from_ver == 4 and to_ver == 5:
|
|
||||||
print "-"*80
|
print "-"*80
|
||||||
print "Your bench was upgraded to version 5"
|
print "Your bench was upgraded to version {0}".format(to_ver)
|
||||||
|
|
||||||
if conf.get('restart_supervisor_on_update'):
|
if conf.get('restart_supervisor_on_update'):
|
||||||
|
if from_ver == 4 and to_ver == 5:
|
||||||
generate_redis_cache_config(bench=bench)
|
generate_redis_cache_config(bench=bench)
|
||||||
generate_supervisor_config(bench=bench)
|
generate_supervisor_config(bench=bench)
|
||||||
generate_nginx_config(bench=bench)
|
generate_nginx_config(bench=bench)
|
||||||
setup_procfile(bench=bench)
|
setup_procfile(bench=bench)
|
||||||
setup_backups(bench=bench)
|
setup_backups(bench=bench)
|
||||||
|
|
||||||
|
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 "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 "To complete the migration, please run the following commands"
|
||||||
print
|
print
|
||||||
print "sudo service nginx restart"
|
print "sudo service nginx restart"
|
||||||
print "sudo supervisorctl reload"
|
print "sudo supervisorctl reload"
|
||||||
if from_ver <= 5 and to_ver == 6:
|
|
||||||
generate_redis_cache_config(bench=bench)
|
|
||||||
generate_redis_async_broker_config(bench=bench)
|
|
||||||
|
|
||||||
def update_translations_p(args):
|
def update_translations_p(args):
|
||||||
update_translations(*args)
|
update_translations(*args)
|
||||||
|
Loading…
Reference in New Issue
Block a user