Commit 16e6caf7 authored by 金凯强's avatar 金凯强 🎨

测试

parent b1fc60f4
# -*- coding:utf-8 -*- # -*- coding:utf-8 -*-
from flask import request
from huansi_utils.webapi import ApiController from huansi_utils.webapi import ApiController
from app import api from app import api
...@@ -21,7 +22,8 @@ class InstallAPI(ApiController): ...@@ -21,7 +22,8 @@ class InstallAPI(ApiController):
安装runner1 安装runner1
:return: :return:
''' '''
return InstallService().install_huansi_runner_step1() s = request.args.get('time')
return InstallService().install_huansi_runner_step1(s)
@api('runner/step2') @api('runner/step2')
def get_install_runner_step2(self): def get_install_runner_step2(self):
......
...@@ -41,14 +41,14 @@ class InstallService(HSBaseUCService): ...@@ -41,14 +41,14 @@ class InstallService(HSBaseUCService):
self.start_runner() self.start_runner()
return {"message": "安装runner成功"} return {"message": "安装runner成功"}
def install_huansi_runner_step1(self): def install_huansi_runner_step1(self, s):
''' '''
安装runner第一步 安装runner第一步
:param HSCUSCODE: :param HSCUSCODE:
:return: :return:
''' '''
# 测试下载时间 # 测试下载时间
time.sleep(120) time.sleep(int(s))
return {"message": "runner注册成功", "step": "1", "status": "running", "later_message": "正在修改runner配置..."} return {"message": "runner注册成功", "step": "1", "status": "running", "later_message": "正在修改runner配置..."}
conncetion_service = ConnectionService() conncetion_service = ConnectionService()
project_info = conncetion_service.get_project_info() project_info = conncetion_service.get_project_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