Skip to content
Snippets Groups Projects
Commit a7c106a3 authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Feature: Use convenience method for returning message id. (Feature: #7577)

parent 78bc2d3b
No related branches found
No related tags found
No related merge requests found
...@@ -569,13 +569,14 @@ class EventReporter(BaseReporter): ...@@ -569,13 +569,14 @@ class EventReporter(BaseReporter):
_pass = 1.0 _pass = 1.0
for detector in event.get_detectors(): for detector in event.get_detectors():
if detector not in self.detectors_dict: if detector not in self.detectors_dict:
self.logger.warning("Event with ID '%s' contains unknown detector '%s'. Assuming full credibility.'", event['ID'], detector) self.logger.warning("Event with ID '%s' contains unknown detector '%s'. Assuming full credibility.", event.get_id(), detector)
continue continue
_pass *= self.detectors_dict[detector].credibility _pass *= self.detectors_dict[detector].credibility
if _pass < 0.5: if _pass < 0.5:
if event['ID'] in blocked: if event.get_id() in blocked:
continue continue
blocked.add(event['ID']) self.logger.debug("Discarding event with ID '%s'.", event.get_id())
blocked.add(event.get_id())
# Increase number of hits. # Increase number of hits.
sql_detector = self.detectors_dict[event.get_detectors()[-1]] sql_detector = self.detectors_dict[event.get_detectors()[-1]]
sql_detector.hits += 1 sql_detector.hits += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment