Check trigger strange

This commit is contained in:
mr
2026-03-20 13:41:12 +01:00
parent e6eb516f39
commit f1a9214ac7

View File

@@ -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.