MCPcopy Create free account
hub / github.com/Icinga/icinga2 / EnsureFrameCleanupTimer

Function EnsureFrameCleanupTimer

lib/remote/consolehandler.cpp:48–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48static void EnsureFrameCleanupTimer()
49{
50 static boost::once_flag once = BOOST_ONCE_INIT;
51
52 boost::call_once(once, []() {
53 l_FrameCleanupTimer = Timer::Create();
54 l_FrameCleanupTimer->OnTimerExpired.connect([](const Timer * const&) { ScriptFrameCleanupHandler(); });
55 l_FrameCleanupTimer->SetInterval(30);
56 l_FrameCleanupTimer->Start();
57 });
58}
59
60static std::shared_ptr<ApiScriptFrame> GetOrCreateScriptFrame(const String& session) {
61 std::unique_lock<std::mutex> lock(l_ApiScriptMutex);

Callers 2

ExecuteScriptHelperMethod · 0.85

Calls 3

SetIntervalMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected