Drop IcingaDB#HandleEvents()

This commit is contained in:
Alexander A. Klimov 2020-03-04 11:26:02 +01:00
parent 54d555bd92
commit ff0efbc2a2
2 changed files with 0 additions and 30 deletions

View File

@ -81,9 +81,6 @@ void IcingaDB::Start(bool runtimeCreated)
m_WorkQueue.SetName("IcingaDB");
boost::thread thread(&IcingaDB::HandleEvents, this);
thread.detach();
m_Rcon->SuppressQueryKind(Prio::CheckResult);
m_Rcon->SuppressQueryKind(Prio::State);
}
@ -156,32 +153,6 @@ void IcingaDB::PublishStats()
m_Rcon->FireAndForgetQuery(std::move(eval), Prio::Heartbeat);
}
void IcingaDB::HandleEvents()
{
String queueName = Utility::NewUniqueID();
EventQueue::Ptr queue = new EventQueue(queueName);
EventQueue::Register(queueName, queue);
std::set<String> types;
types.insert("CheckResult");
types.insert("AcknowledgementSet");
types.insert("AcknowledgementCleared");
queue->SetTypes(types);
queue->AddClient(this);
for (;;) {
Dictionary::Ptr event = queue->WaitForEvent(this);
if (!event)
continue;
}
queue->RemoveClient(this);
EventQueue::UnregisterIfUnused(queueName, queue);
}
void IcingaDB::Stop(bool runtimeRemoved)
{
Log(LogInformation, "IcingaDB")

View File

@ -37,7 +37,6 @@ public:
private:
void ReconnectTimerHandler();
void TryToReconnect();
void HandleEvents();
void PublishStatsTimerHandler();
void PublishStats();