2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 16:36:25 +00:00

reset cronjobs on upgrade and merge on switching branches

This commit is contained in:
Pratik Vyas 2015-05-05 09:44:03 +05:30
parent 05a27304dd
commit de9427476d
2 changed files with 10 additions and 8 deletions

View File

@ -153,6 +153,7 @@ def switch_branch(branch, apps=None, bench='.', upgrade=False):
if os.path.exists(app_dir):
exec_cmd("git fetch upstream", cwd=app_dir)
exec_cmd("git checkout {branch}".format(branch=branch), cwd=app_dir)
exec_cmd("git merge upstream/{branch}".format(branch=branch), cwd=app_dir)
if version_upgrade and upgrade:
pre_upgrade(version_upgrade[0], version_upgrade[1])

View File

@ -372,14 +372,14 @@ def drop_privileges(uid_name='nobody', gid_name='nogroup'):
def fix_prod_setup_perms(frappe_user=None):
files = [
"logs/web.error.log",
"logs/web.log",
"logs/workerbeat.error.log",
"logs/workerbeat.log",
"logs/worker.error.log",
"logs/worker.log",
"config/nginx.conf",
"config/supervisor.conf",
"logs/web.error.log",
"logs/web.log",
"logs/workerbeat.error.log",
"logs/workerbeat.log",
"logs/worker.error.log",
"logs/worker.log",
"config/nginx.conf",
"config/supervisor.conf",
]
if not frappe_user:
@ -452,6 +452,7 @@ def post_upgrade(from_ver, to_ver, 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