Planner: improve logging for short slots (#7007)
This commit is contained in:
parent
73076e8f8f
commit
96b6daf678
1 changed files with 3 additions and 2 deletions
|
|
@ -123,8 +123,9 @@ func (lp *Loadpoint) plannerActive() (active bool) {
|
|||
|
||||
if active {
|
||||
// ignore short plans if not already active
|
||||
if !lp.planActive && lp.clock.Until(activeSlot.End) < smallSlotDuration {
|
||||
lp.log.DEBUG.Printf("plan too short- ignoring remaining %v", requiredDuration.Round(time.Second))
|
||||
// TODO only ignore if the next adjacent slot is inactive, too
|
||||
if slotRemaining := lp.clock.Until(activeSlot.End); !lp.planActive && slotRemaining < smallSlotDuration {
|
||||
lp.log.DEBUG.Printf("plan slot too short- ignoring remaining %v", slotRemaining.Round(time.Second))
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue