Commit bd7124c7 authored by 金凯强's avatar 金凯强 🎨

修复work_shop_no报错

parent b2fd772e
Pipeline #22285 failed with stage
in 11 seconds
......@@ -59,11 +59,11 @@ class UpgradeAPI(ApiController):
'''
return UpgradeService().package_images(log_id)
@api('compare_image_info/<string:project_no>')
def get_compare_image_info(self, project_no):
@api('compare_image_info/<string:project_no>/<string:work_shop_no>')
def get_compare_image_info(self, project_no, work_shop_no):
'''
获取服务器和本地要推送的镜像对比
:param project_no:
:return:
'''
return UpgradeService().get_compare_image_info(project_no)
return UpgradeService().get_compare_image_info(project_no, work_shop_no)
......@@ -133,7 +133,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
# 找到服务器ip
# 上传app包到服务器
remote_server_info = ConnectionService().get_remote_server_info(project_no)
remote_server_info = ConnectionService().get_remote_server_info(project_no, work_shop_no)
if not remote_server_info:
logger.info('远程升级失败')
raise HSException('远端服务器信息未查到,请先配置')
......@@ -458,7 +458,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
logger.info('远程升级失败')
raise HSException('数据库连接失败')
# 查询远程配置信息
remote_server_info = conncetion_service.get_remote_server_info(project_no)
remote_server_info = conncetion_service.get_remote_server_info(project_no, work_shop_no)
# 上传文件
if not remote_server_info:
logger.info('远程升级失败')
......@@ -474,7 +474,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
return {'message': '上传成功'}
def get_compare_image_info(self, project_no):
def get_compare_image_info(self, project_no, work_shop_no):
'''
获取服务器和本地要推送的镜像对比
:param project_no:
......@@ -482,7 +482,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
'''
conncetion_service = ConnectionService()
# 查询远程配置信息
remote_server_info = conncetion_service.get_remote_server_info(project_no)
remote_server_info = conncetion_service.get_remote_server_info(project_no, work_shop_no)
# 上传文件
if not remote_server_info:
logger.info('远程升级失败')
......
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