1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-07 14:21:55 +00:00
This commit is contained in:
Newnius 2020-06-15 15:16:43 +08:00
parent d8e5d36311
commit 3405fb8262
2 changed files with 14 additions and 0 deletions

View File

@ -241,6 +241,17 @@ func (allocator *Allocator) GA(nodes []NodeStatus, tasks []Task, useBestFit bool
}
//fmt.Println(evaluatue(allocation))
//fmt.Println(allocation)
cnt := 0
for _, tasks := range allocation.TasksOnNode {
for range tasks {
cnt++
}
}
if cnt != len(allocation.Tasks) && allocation.Flags["valid"] {
log.Warn("1:", cnt, len(allocation.Tasks))
}
return allocation
}

View File

@ -97,6 +97,9 @@ func (X Allocation) Mutate(rng *rand.Rand) {
}
}
}
if cnt != 0 {
log.Warn("task ", task.Name, " still need ", cnt)
}
//log.Info("After ", X.Nodes[nodeID].Status)
} else {