From 090fae013daa3b30fc10740e2d0df09ebe0d8856 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 9 Feb 2023 22:55:18 +0000 Subject: [PATCH] Remove debug statements --- core/db/elastic.py | 4 ---- core/lib/rules.py | 7 ------- 2 files changed, 11 deletions(-) diff --git a/core/db/elastic.py b/core/db/elastic.py index 3d4151a..e63c3a2 100644 --- a/core/db/elastic.py +++ b/core/db/elastic.py @@ -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"] diff --git a/core/lib/rules.py b/core/lib/rules.py index e00d02d..89fe394 100644 --- a/core/lib/rules.py +++ b/core/lib/rules.py @@ -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"