Remove debug statements
This commit is contained in:
parent
2356c6bcd7
commit
090fae013d
|
@ -376,11 +376,7 @@ class ElasticsearchBackend(StorageBackend):
|
|||
for index, (meta, result) in result_map.items():
|
||||
# Default to true, if no aggs are found, we still want to match
|
||||
match = True
|
||||
print("RULE OBJECT", rule_object.aggs)
|
||||
print("META", meta)
|
||||
for agg_name, (operator, number) in rule_object.aggs.items():
|
||||
print("AGG NAME", agg_name, "OPERATOR", operator, "NUMBER", number)
|
||||
|
||||
if agg_name in meta["aggs"]:
|
||||
agg_value = meta["aggs"][agg_name]["value"]
|
||||
|
||||
|
|
|
@ -310,7 +310,6 @@ class NotificationRuleData(object):
|
|||
"""
|
||||
new_aggs = {}
|
||||
for agg_name, agg in aggs.items():
|
||||
print("ITER", agg_name, agg)
|
||||
# Already checked membership below
|
||||
if agg_name in self.aggs:
|
||||
op, value = self.aggs[agg_name]
|
||||
|
@ -384,7 +383,6 @@ class NotificationRuleData(object):
|
|||
meta["matched"] = self.format_matched(message)
|
||||
if "aggs" in meta:
|
||||
meta["matched"] = self.format_aggs(meta["aggs"])
|
||||
print("MATCHED", meta["matched"])
|
||||
|
||||
rule_notify(self.object, index, message, meta)
|
||||
self.store_match(index, message)
|
||||
|
@ -482,14 +480,9 @@ class NotificationRuleData(object):
|
|||
if "match" in meta["aggs"][agg_name]:
|
||||
aggs_for_index.append(meta["aggs"][agg_name]["match"])
|
||||
|
||||
print("aggs_for_index", aggs_for_index)
|
||||
print("self aggs", self.aggs.keys())
|
||||
|
||||
# All required aggs are present
|
||||
if len(aggs_for_index) == len(self.aggs.keys()):
|
||||
print("Key len match")
|
||||
if all(aggs_for_index):
|
||||
print("all aggs for index true")
|
||||
# All aggs have matched
|
||||
await self.rule_matched(
|
||||
index, results[: self.object.amount], meta, mode="schedule"
|
||||
|
|
Loading…
Reference in New Issue