Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
install.api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Script
install.api
Commits
71dfc385
Commit
71dfc385
authored
Mar 14, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正式版本发布前的小修改
parent
16e6caf7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
10 deletions
+3
-10
install_api.py
app/install/install_api.py
+1
-2
install_service.py
app/install/install_service.py
+1
-7
upgrade_service.py
app/upgrade/upgrade_service.py
+1
-1
No files found.
app/install/install_api.py
View file @
71dfc385
...
...
@@ -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
):
...
...
app/install/install_service.py
View file @
71dfc385
...
...
@@ -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"
}
...
...
app/upgrade/upgrade_service.py
View file @
71dfc385
...
...
@@ -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
(
'该版本已经是最新版本,不能进行回滚操作'
)
# 找到记录的镜像信息
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment