* Resume is equivalent to Start, but with HA capabilities to resume at runtime. */
| 79 | * Resume is equivalent to Start, but with HA capabilities to resume at runtime. |
| 80 | */ |
| 81 | void 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. |
nothing calls this directly
no test coverage detected