mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +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;
|
||||
auto downtimeOptionsHash (HashDowntimeOptions());
|
||||
|
||||
for (const Downtime::Ptr& downtime : GetCheckable()->GetDowntimes()) {
|
||||
if (downtime->GetScheduledBy() != GetName())
|
||||
continue;
|
||||
|
||||
auto configOwnerHash (downtime->GetConfigOwnerHash());
|
||||
if (!configOwnerHash.IsEmpty() && configOwnerHash != downtimeOptionsHash)
|
||||
continue;
|
||||
|
||||
double end = downtime->GetEndTime();
|
||||
if (end > minEnd)
|
||||
minEnd = end;
|
||||
|
Loading…
x
Reference in New Issue
Block a user