mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
New event queue: handle empty filter
This commit is contained in:
parent
94db282fd1
commit
5e8b4280bc
@ -145,7 +145,7 @@ EventQueueRegistry *EventQueueRegistry::GetInstance()
|
||||
}
|
||||
|
||||
std::mutex EventsInbox::m_FiltersMutex;
|
||||
std::map<String, EventsInbox::Filter> EventsInbox::m_Filters;
|
||||
std::map<String, EventsInbox::Filter> EventsInbox::m_Filters ({{"", EventsInbox::Filter{1, nullptr}}});
|
||||
|
||||
EventsRouter EventsRouter::m_Instance;
|
||||
|
||||
@ -262,6 +262,7 @@ EventsFilter::operator bool()
|
||||
void EventsFilter::Push(Dictionary::Ptr event)
|
||||
{
|
||||
for (auto& perFilter : m_Inboxes) {
|
||||
if (perFilter.first) {
|
||||
ScriptFrame frame(true);
|
||||
frame.Sandboxed = true;
|
||||
|
||||
@ -274,6 +275,7 @@ void EventsFilter::Push(Dictionary::Ptr event)
|
||||
<< "Error occurred while evaluating event filter for queue: " << DiagnosticInformation(ex);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& inbox : perFilter.second) {
|
||||
inbox->Push(event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user