Rename Downtime::DowntimesExpireTimerHandler()

to actually reflect its purpose.
This commit is contained in:
Alexander A. Klimov 2022-12-15 15:23:27 +01:00
parent 6adf2d19e4
commit 0ac1cd1ecb
2 changed files with 7 additions and 7 deletions

View File

@ -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. */

View File

@ -91,7 +91,7 @@ private:
void SetupCleanupTimer(); void SetupCleanupTimer();
static void DowntimesStartTimerHandler(); static void DowntimesStartTimerHandler();
static void DowntimesExpireTimerHandler(); static void DowntimesOrphanedTimerHandler();
}; };
} }