mirror of https://github.com/Icinga/icinga2.git
Rename Downtime::DowntimesExpireTimerHandler()
to actually reflect its purpose.
This commit is contained in:
parent
6adf2d19e4
commit
0ac1cd1ecb
|
@ -17,7 +17,7 @@ using namespace icinga;
|
||||||
static int l_NextDowntimeID = 1;
|
static int l_NextDowntimeID = 1;
|
||||||
static std::mutex l_DowntimeMutex;
|
static std::mutex l_DowntimeMutex;
|
||||||
static std::map<int, String> l_LegacyDowntimesCache;
|
static std::map<int, String> l_LegacyDowntimesCache;
|
||||||
static Timer::Ptr l_DowntimesExpireTimer;
|
static Timer::Ptr l_DowntimesOrphanedTimer;
|
||||||
static Timer::Ptr l_DowntimesStartTimer;
|
static Timer::Ptr l_DowntimesStartTimer;
|
||||||
|
|
||||||
boost::signals2::signal<void (const Downtime::Ptr&)> Downtime::OnDowntimeAdded;
|
boost::signals2::signal<void (const Downtime::Ptr&)> Downtime::OnDowntimeAdded;
|
||||||
|
@ -99,10 +99,10 @@ void Downtime::Start(bool runtimeCreated)
|
||||||
l_DowntimesStartTimer->OnTimerExpired.connect([](const Timer * const&){ DowntimesStartTimerHandler(); });
|
l_DowntimesStartTimer->OnTimerExpired.connect([](const Timer * const&){ DowntimesStartTimerHandler(); });
|
||||||
l_DowntimesStartTimer->Start();
|
l_DowntimesStartTimer->Start();
|
||||||
|
|
||||||
l_DowntimesExpireTimer = Timer::Create();
|
l_DowntimesOrphanedTimer = Timer::Create();
|
||||||
l_DowntimesExpireTimer->SetInterval(60);
|
l_DowntimesOrphanedTimer->SetInterval(60);
|
||||||
l_DowntimesExpireTimer->OnTimerExpired.connect([](const Timer * const&) { DowntimesExpireTimerHandler(); });
|
l_DowntimesOrphanedTimer->OnTimerExpired.connect([](const Timer * const&) { DowntimesOrphanedTimerHandler(); });
|
||||||
l_DowntimesExpireTimer->Start();
|
l_DowntimesOrphanedTimer->Start();
|
||||||
});
|
});
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -540,7 +540,7 @@ void Downtime::DowntimesStartTimerHandler()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Downtime::DowntimesExpireTimerHandler()
|
void Downtime::DowntimesOrphanedTimerHandler()
|
||||||
{
|
{
|
||||||
for (const Downtime::Ptr& downtime : ConfigType::GetObjectsByType<Downtime>()) {
|
for (const Downtime::Ptr& downtime : ConfigType::GetObjectsByType<Downtime>()) {
|
||||||
/* Only remove downtimes which are activated after daemon start. */
|
/* Only remove downtimes which are activated after daemon start. */
|
||||||
|
|
|
@ -91,7 +91,7 @@ private:
|
||||||
void SetupCleanupTimer();
|
void SetupCleanupTimer();
|
||||||
|
|
||||||
static void DowntimesStartTimerHandler();
|
static void DowntimesStartTimerHandler();
|
||||||
static void DowntimesExpireTimerHandler();
|
static void DowntimesOrphanedTimerHandler();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue