优化节点到API节点连接管理

This commit is contained in:
GoEdgeLab
2021-08-08 16:17:25 +08:00
parent e979414973
commit a5118536e7
3 changed files with 19 additions and 5 deletions

View File

@@ -67,11 +67,12 @@ func (this *NodeTaskDAO) CreateNodeTask(tx *dbs.Tx, role string, clusterId int64
"isOk": 0,
"error": "",
}, maps.Map{
"clusterId": clusterId,
"updatedAt": updatedAt,
"isDone": 0,
"isOk": 0,
"error": "",
"clusterId": clusterId,
"updatedAt": updatedAt,
"isDone": 0,
"isOk": 0,
"error": "",
"isNotified": 0,
})
return err
}
@@ -291,6 +292,7 @@ func (this *NodeTaskDAO) FindAllDoingNodeIds(tx *dbs.Tx, role string) ([]int64,
Attr("role", role).
Gt("nodeId", 0).
Attr("isDone", false).
Attr("isNotified", 0).
FindAll()
if err != nil {
return nil, err