在缓存任务键值中增加集群信息,以便于调试问题

This commit is contained in:
GoEdgeLab
2024-03-10 11:25:18 +08:00
parent 85b07eaec7
commit b7681973ce
2 changed files with 20 additions and 2 deletions

View File

@@ -99,11 +99,24 @@ func (this *TaskAction) readTask(taskId int64) (ok bool) {
})
}
// 集群信息
var clusterMap = maps.Map{
"id": 0,
"name": "",
}
if key.NodeCluster != nil {
clusterMap = maps.Map{
"id": key.NodeCluster.Id,
"name": key.NodeCluster.Name,
}
}
keyMaps = append(keyMaps, maps.Map{
"key": key.Key,
"isDone": key.IsDone,
"isDoing": key.IsDoing,
"errors": errorMaps,
"cluster": clusterMap,
})
}