mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 08:16:43 +00:00
update
This commit is contained in:
@@ -789,18 +789,16 @@ func (pool *ResourcePool) acquireResource(job Job) []NodeStatus {
|
||||
/* assign */
|
||||
var ress []NodeStatus
|
||||
if len(candidates) > 0 {
|
||||
for range job.Tasks { //append would cause uncertain order
|
||||
ress = append(ress, NodeStatus{ClientID: "null"})
|
||||
}
|
||||
|
||||
var nodesT []NodeStatus
|
||||
for _, node := range candidates {
|
||||
nodesT = append(nodesT, node.Copy())
|
||||
}
|
||||
|
||||
allocation := fastBestFit(nodesT, job.Tasks)
|
||||
if !allocation.Flags["valid"] {
|
||||
return []NodeStatus{}
|
||||
if allocation.Flags["valid"] {
|
||||
|
||||
for range job.Tasks { //append would cause uncertain order
|
||||
ress = append(ress, NodeStatus{ClientID: "null"})
|
||||
}
|
||||
|
||||
for nodeID, tasks := range allocation.TasksOnNode {
|
||||
@@ -853,6 +851,7 @@ func (pool *ResourcePool) acquireResource(job Job) []NodeStatus {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
for segID, lock := range locks {
|
||||
log.Debug("Unlock ", segID)
|
||||
|
||||
Reference in New Issue
Block a user