Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chain33-pai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
chain33-pai
Commits
8db8fbea
Commit
8db8fbea
authored
Jan 02, 2020
by
ligaishun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update node.go
parent
895c0eb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
node.go
routers/api/v1/node.go
+8
-7
No files found.
routers/api/v1/node.go
View file @
8db8fbea
...
@@ -101,13 +101,7 @@ func UpdateNode(c *gin.Context){
...
@@ -101,13 +101,7 @@ func UpdateNode(c *gin.Context){
appG
.
Response
(
http
.
StatusOK
,
e
.
NETWORK_ERROR
,
"network error,please checkout your network then try again"
)
appG
.
Response
(
http
.
StatusOK
,
e
.
NETWORK_ERROR
,
"network error,please checkout your network then try again"
)
return
return
}
}
t
,
err
:=
app
.
SafeCloseNode
()
if
err
!=
nil
||
!
t
{
app
.
UpdateInfo
.
Flag
=
true
app
.
BityuanFlag
=
false
appG
.
Response
(
http
.
StatusOK
,
e
.
NODE_ERROR
,
err
)
return
}
name
:=
setting
.
BityuanSetting
.
Name
+
"_"
+
latestVersion
+
".tar.gz"
name
:=
setting
.
BityuanSetting
.
Name
+
"_"
+
latestVersion
+
".tar.gz"
url
:=
setting
.
Chain33Pai
.
DownloadUrl
+
name
url
:=
setting
.
Chain33Pai
.
DownloadUrl
+
name
err
=
app
.
DownLoadFile
(
url
,
name
,
int32
(
1
))
err
=
app
.
DownLoadFile
(
url
,
name
,
int32
(
1
))
...
@@ -171,6 +165,13 @@ func UpdateNode(c *gin.Context){
...
@@ -171,6 +165,13 @@ func UpdateNode(c *gin.Context){
app
.
BityuanFlag
=
false
app
.
BityuanFlag
=
false
return
return
}
}
t
,
err
:=
app
.
SafeCloseNode
()
if
err
!=
nil
||
!
t
{
app
.
UpdateInfo
.
Flag
=
true
app
.
BityuanFlag
=
false
appG
.
Response
(
http
.
StatusOK
,
e
.
NODE_ERROR
,
err
)
return
}
//替换原执行文件
//替换原执行文件
log
.
Println
(
setting
.
BityuanSetting
.
Name
+
"_"
+
latestVersion
)
log
.
Println
(
setting
.
BityuanSetting
.
Name
+
"_"
+
latestVersion
)
log
.
Println
(
absPath
)
log
.
Println
(
absPath
)
...
...
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