Fix ScheduledDowntimes replicating on restart

fixes #4272
This commit is contained in:
Jean Flach 2018-06-08 10:54:06 +02:00
parent ee37c8c68e
commit 0fc5db82dd
2 changed files with 7 additions and 0 deletions

View File

@ -176,6 +176,9 @@ void ScheduledDowntime::CreateNextDowntime()
return; return;
} }
Log(LogDebug, "ScheduledDowntime")
<< "Creating new Downtime for ScheduledDowntime \"" << GetName() << "\"";
std::pair<double, double> segment = FindNextSegment(); std::pair<double, double> segment = FindNextSegment();
if (segment.first == 0 && segment.second == 0) { if (segment.first == 0 && segment.second == 0) {

View File

@ -36,6 +36,10 @@ public:
class ScheduledDowntime : CustomVarObject < ScheduledDowntimeNameComposer class ScheduledDowntime : CustomVarObject < ScheduledDowntimeNameComposer
{ {
// Scheduled Downtimes have a dependency on Downtimes. This is to make sure ScheduledDowntimes are activated after
// the Downtimes (and other checkables)
activation_priority 20;
load_after Host; load_after Host;
load_after Service; load_after Service;