Commit 940bbbd0 authored by 金凯强's avatar 金凯强 🎨

远程升级提示修改

远程升级上传文件的时候只删除tar文件
parent 0e3b953f
Pipeline #22411 passed with stage
in 25 seconds
......@@ -166,8 +166,10 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
logger.info(f"现在没有卡住,是正在上传文件{files},请耐心等待")
ssh.upload(path, f'/huansi/upgrade/{files}')
logger.info(f"地址:{path}上传完毕")
os.remove(path)
logger.info(f"本地缓存{path}已经清除")
if '.tar' in path:
os.remove(path)
logger.info(f"本地缓存{path}已经清除")
ssh.upload(os.path.join(system_file_dir, 'load.sh'), '/huansi/upgrade/load.sh')
# 传入服务器配置的DB
......@@ -175,6 +177,9 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
# ssh.upload(os.path.join(profile_dir, 'huansi_server.sh'), '/huansi/upgrade/huansi.sh')
ssh.upload(os.path.join(system_file_dir, 'load_handle.py'), '/huansi/upgrade/load_handle.py')
logger.info('正在远程升级程序中,请不要着急,慢慢来。。。')
logger.info('温馨提示:如果是第一次升级,会有点慢,但是不要担心是卡住了,更不要断网,这样会功亏一篑')
logger.info('如果您还是担心卡住了,连上客户机的服务器上,输入docker images查看是否多了几个镜像(仅对第一次升级有用)')
out, err = ssh.exec_command("sh /huansi/upgrade/load.sh")
logger.info(f'远程升级信息:{out},远程错误信息:{out}')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment