mirror of https://github.com/Icinga/icinga2.git
Merge pull request #8768 from Icinga/bugfix/scheduleddowntime-interfer
ScheduledDowntime: ignore not related Downtimes while creating Downtimes
This commit is contained in:
commit
fbed8a0463
|
@ -231,12 +231,14 @@ void ScheduledDowntime::CreateNextDowntime()
|
||||||
double minEnd = 0;
|
double minEnd = 0;
|
||||||
|
|
||||||
for (const Downtime::Ptr& downtime : GetCheckable()->GetDowntimes()) {
|
for (const Downtime::Ptr& downtime : GetCheckable()->GetDowntimes()) {
|
||||||
|
if (downtime->GetScheduledBy() != GetName())
|
||||||
|
continue;
|
||||||
|
|
||||||
double end = downtime->GetEndTime();
|
double end = downtime->GetEndTime();
|
||||||
if (end > minEnd)
|
if (end > minEnd)
|
||||||
minEnd = end;
|
minEnd = end;
|
||||||
|
|
||||||
if (downtime->GetScheduledBy() != GetName() ||
|
if (downtime->GetStartTime() < Utility::GetTime())
|
||||||
downtime->GetStartTime() < Utility::GetTime())
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* We've found a downtime that is owned by us and that hasn't started yet - we're done. */
|
/* We've found a downtime that is owned by us and that hasn't started yet - we're done. */
|
||||||
|
|
Loading…
Reference in New Issue