mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
ScheduledDowntime: ignore not related Downtimes while creating Downtimes
This commit is contained in:
parent
a038f513aa
commit
743af40114
@ -238,12 +238,14 @@ void ScheduledDowntime::CreateNextDowntime()
|
||||
double minEnd = 0;
|
||||
|
||||
for (const Downtime::Ptr& downtime : GetCheckable()->GetDowntimes()) {
|
||||
if (downtime->GetScheduledBy() != GetName())
|
||||
continue;
|
||||
|
||||
double end = downtime->GetEndTime();
|
||||
if (end > minEnd)
|
||||
minEnd = end;
|
||||
|
||||
if (downtime->GetScheduledBy() != GetName() ||
|
||||
downtime->GetStartTime() < Utility::GetTime())
|
||||
if (downtime->GetStartTime() < Utility::GetTime())
|
||||
continue;
|
||||
|
||||
/* We've found a downtime that is owned by us and that hasn't started yet - we're done. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user