diff --git a/models/booking/planner/planner.go b/models/booking/planner/planner.go index f3bd5b6..bf693c5 100644 --- a/models/booking/planner/planner.go +++ b/models/booking/planner/planner.go @@ -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.