Commit 6ec57eef authored by 金凯强's avatar 金凯强 🎨

..

parent f782c6fc
......@@ -64,7 +64,7 @@ if __name__ == '__main__':
# 获取app单次升级日志明细
res = requests.get('http://localhost:5000/info/upgrade_log_dtl/1238022723059486720/')
res = requests.get('http://localhost:5000/info/upgrade_log_dtl/1237995081698545664/')
print(json.dumps(res.json(), indent=4))
# 安装runner
......
......@@ -84,7 +84,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
session.exec_sql(f'update app_upgrade_log set default_version=1 where id={log_id}')
session.exec_sql(f'update app_upgrade_log set default_version=0 where id<>{log_id}')
return {'err': err, "out": out}
return {'message': err, "out": out}
# 注意异常情况下的处理
def find_compose_by_upgrade_no(self, upgrade_no):
......@@ -132,7 +132,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
ssh.upload(os.path.join(system_file_dir, 'load.sh'), '/huansi/upgrade/load.sh')
ssh.upload(os.path.join(system_file_dir, 'load_handle.py'), '/huansi/upgrade/load_handle.py')
out, err = ssh.exec_command('sh /huansi/upgrade/load.sh')
out, err = ssh.exec_command("echo 'sh /huansi/upgrade/load.sh'")
logger.info(f'远程升级信息:{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