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:
parent
05a27304dd
commit
de9427476d
@ -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])
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user