Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
power-node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Odysseus
power-node
Commits
601afeec
Commit
601afeec
authored
Mar 20, 2024
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
retry connect nm report taskId
parent
de31e5bf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
model_handler.go
nm/model_handler.go
+1
-0
start.go
nm/start.go
+4
-1
docker.go
operate/docker.go
+2
-0
No files found.
nm/model_handler.go
View file @
601afeec
...
...
@@ -78,6 +78,7 @@ func monitorModelInfo(dockerOp *operate.DockerOp) {
}
dockerOp
.
ModelsInfo
=
modelInfosResp
reportTaskIds
=
append
(
reportTaskIds
,
maxLong
)
dockerOp
.
ReportTaskIds
=
reportTaskIds
dockerOp
.
ModelTaskIdIndexesChan
<-
reportTaskIds
ticker
=
time
.
NewTicker
(
time
.
Minute
*
10
)
}
...
...
nm/start.go
View file @
601afeec
...
...
@@ -51,7 +51,7 @@ func StartMonitor() {
isSelect
:=
false
for
i
:=
0
;
i
<
len
(
nodeManagerArr
);
i
++
{
// TODO: 需要对索引进行一定的规则判断,随机选择其中的nodeManager进行链接
if
int64
(
connectNodeManagerCount
)
==
conf
.
GetConfig
()
.
NodeManagerNum
{
if
connectNodeManagerCount
==
conf
.
GetConfig
()
.
NodeManagerNum
{
log
.
Warn
(
"Nothing available node manager.................................."
)
break
}
...
...
@@ -106,6 +106,9 @@ func StartMonitor() {
if
isSuccess
{
log
.
Info
(
"Connect node manager client success:"
,
manager
.
Info
.
Endpoint
)
managerClient
.
UpdateLastHeartTime
(
time
.
Now
())
if
len
(
dockerOp
.
ReportTaskIds
)
>
0
{
dockerOp
.
ModelTaskIdIndexesChan
<-
dockerOp
.
ReportTaskIds
}
continue
}
}
...
...
operate/docker.go
View file @
601afeec
...
...
@@ -29,6 +29,7 @@ type DockerOp struct {
SignApi
map
[
string
]
string
ModelsInfo
[]
*
models
.
ModelInfo
ModelTaskIdIndexesChan
chan
[]
uint64
ReportTaskIds
[]
uint64
}
func
init
()
{
...
...
@@ -51,6 +52,7 @@ func NewDockerOp() *DockerOp {
ModelsInfo
:
make
([]
*
models
.
ModelInfo
,
1000
),
UsedExternalPort
:
make
(
map
[
int64
]
bool
,
0
),
ModelTaskIdIndexesChan
:
make
(
chan
[]
uint64
,
0
),
ReportTaskIds
:
make
([]
uint64
,
0
),
}
}
...
...
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