Allow disabling ingesting

This commit is contained in:
2023-02-13 21:03:33 +00:00
parent 0e12b0d185
commit 27fea06198
4 changed files with 45 additions and 8 deletions

View File

@@ -357,7 +357,8 @@ class NotificationRuleData(object):
:param matches: the matches to store
"""
# new_matches = self.reform_matches(index, matches, meta, mode)
await self.db.async_store_matches(matches)
if self.object.ingest:
await self.db.async_store_matches(matches)
def ingest_matches_sync(self, index, matches, meta, mode):
"""
@@ -366,7 +367,8 @@ class NotificationRuleData(object):
:param matches: the matches to store
"""
# new_matches = self.reform_matches(index, matches, meta, mode)
self.db.store_matches(matches)
if self.object.ingest:
self.db.store_matches(matches)
async def rule_matched(self, index, message, meta, mode):
"""