Commit 71dfc385 authored by 金凯强's avatar 金凯强 🎨

正式版本发布前的小修改

parent 16e6caf7
......@@ -22,8 +22,7 @@ class InstallAPI(ApiController):
安装runner1
:return:
'''
s = request.args.get('time')
return InstallService().install_huansi_runner_step1(s)
return InstallService().install_huansi_runner_step1()
@api('runner/step2')
def get_install_runner_step2(self):
......
......@@ -41,15 +41,13 @@ class InstallService(HSBaseUCService):
self.start_runner()
return {"message": "安装runner成功"}
def install_huansi_runner_step1(self, s):
def install_huansi_runner_step1(self):
'''
安装runner第一步
:param HSCUSCODE:
:return:
'''
# 测试下载时间
time.sleep(int(s))
return {"message": "runner注册成功", "step": "1", "status": "running", "later_message": "正在修改runner配置..."}
conncetion_service = ConnectionService()
project_info = conncetion_service.get_project_info()
if not project_info:
......@@ -71,8 +69,6 @@ class InstallService(HSBaseUCService):
:param HSCUSCODE:
:return:
'''
time.sleep(1)
return {"message": "runner配置修改成功", "step": "2", "status": "running", "later_message": "正在重启runner..."}
self._edit_runner_setting()
self._remove_old_runner_container()
......@@ -84,8 +80,6 @@ class InstallService(HSBaseUCService):
:param HSCUSCODE:
:return:
'''
time.sleep(1)
return {"message": "runner重启成功", "step": "3", "status": "success"}
self.start_runner()
return {"message": "runner重启成功", "step": "3", "status": "success"}
......
......@@ -26,7 +26,7 @@ class UpgradeService():
query_sql = f'''select * from app_upgrade_log where id={log_id}'''
data = session.retrive_sql(query_sql)
if data['default_version'] == 1:
if data['default_version'] == '1':
raise HSException('该版本已经是最新版本,不能进行回滚操作')
# 找到记录的镜像信息
......
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