mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
On ScheduledDowntime change: ignore downtimes created before change
... while creating new downtimes. refs #8309
This commit is contained in:
parent
a262d18921
commit
ffa3872b28
@ -240,11 +240,16 @@ void ScheduledDowntime::CreateNextDowntime()
|
|||||||
}
|
}
|
||||||
|
|
||||||
double minEnd = 0;
|
double minEnd = 0;
|
||||||
|
auto downtimeOptionsHash (HashDowntimeOptions());
|
||||||
|
|
||||||
for (const Downtime::Ptr& downtime : GetCheckable()->GetDowntimes()) {
|
for (const Downtime::Ptr& downtime : GetCheckable()->GetDowntimes()) {
|
||||||
if (downtime->GetScheduledBy() != GetName())
|
if (downtime->GetScheduledBy() != GetName())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
auto configOwnerHash (downtime->GetConfigOwnerHash());
|
||||||
|
if (!configOwnerHash.IsEmpty() && configOwnerHash != downtimeOptionsHash)
|
||||||
|
continue;
|
||||||
|
|
||||||
double end = downtime->GetEndTime();
|
double end = downtime->GetEndTime();
|
||||||
if (end > minEnd)
|
if (end > minEnd)
|
||||||
minEnd = end;
|
minEnd = end;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user