Commit cd89a7c0 authored by duanjinfei's avatar duanjinfei

update report resource map

parent ed037c8b
......@@ -181,14 +181,16 @@ func (n *NodeManagerHandler) ReportResourceMap(dockerOp *operate.DockerOp) {
select {
case <-ticker.C:
if len(dockerOp.ReportModelIds) > 0 {
isAdd := make(map[uint64]bool, 0)
bootUpModelIds := make([]uint64, 0)
containers := dockerOp.ListContainer()
if containers != nil && len(containers) > 0 {
for _, container := range containers {
if container.State == "running" {
taskId := dockerOp.BootUpModelId[container.Image]
if taskId != 0 {
if taskId != 0 && !isAdd[taskId] {
bootUpModelIds = append(bootUpModelIds, taskId)
isAdd[taskId] = true
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment