Check trigger strange
This commit is contained in:
@@ -154,16 +154,19 @@ func (p *Planner) Check(resourceID string, instanceID string, req *ResourceReque
|
||||
|
||||
slots, ok := p.Schedule[resourceID]
|
||||
if !ok {
|
||||
fmt.Println("CHECK1", true)
|
||||
return true
|
||||
}
|
||||
|
||||
fmt.Println("CHECK2", len(slots))
|
||||
for _, slot := range slots {
|
||||
// Only consider slots on the same instance
|
||||
if slot.InstanceID != instanceID {
|
||||
fmt.Println("CHECK3 MISS", slot.InstanceID, instanceID)
|
||||
continue
|
||||
}
|
||||
// Only consider overlapping slots
|
||||
if !slot.Start.Before(*end) || !slot.End.After(start) {
|
||||
fmt.Println("CHECK4 MISS", slot.Start, slot.End, start, end)
|
||||
continue
|
||||
}
|
||||
// If capacity is unknown (reqPct empty), any overlap blocks the slot.
|
||||
|
||||
Reference in New Issue
Block a user