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

Method Resume

lib/perfdata/graphitewriter.cpp:81–103  ·  view source on GitHub ↗

* Resume is equivalent to Start, but with HA capabilities to resume at runtime. */

Source from the content-addressed store, hash-verified

79 * Resume is equivalent to Start, but with HA capabilities to resume at runtime.
80 */
81void GraphiteWriter::Resume()
82{
83 ObjectImpl<GraphiteWriter>::Resume();
84
85 Log(LogInformation, "GraphiteWriter")
86 << "'" << GetName() << "' resumed.";
87
88 /* Register exception handler for WQ tasks. */
89 m_WorkQueue.SetExceptionCallback([this](boost::exception_ptr exp) { ExceptionHandler(std::move(exp)); });
90
91 /* Timer for reconnecting */
92 m_ReconnectTimer = Timer::Create();
93 m_ReconnectTimer->SetInterval(10);
94 m_ReconnectTimer->OnTimerExpired.connect([this](const Timer * const&) { ReconnectTimerHandler(); });
95 m_ReconnectTimer->Start();
96 m_ReconnectTimer->Reschedule(0);
97
98 /* Register event handlers. */
99 m_HandleCheckResults = Checkable::OnNewCheckResult.connect([this](const Checkable::Ptr& checkable,
100 const CheckResult::Ptr& cr, const MessageOrigin::Ptr&) {
101 CheckResultHandler(checkable, cr);
102 });
103}
104
105/**
106 * Pause is equivalent to Stop, but with HA capabilities to resume at runtime.

Callers

nothing calls this directly

Calls 5

LogClass · 0.85
SetExceptionCallbackMethod · 0.80
SetIntervalMethod · 0.80
RescheduleMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected