Support sending messages when a rule no longer matches and fix dual-use notification sender
This commit is contained in:
@@ -2,7 +2,7 @@ import msgpack
|
||||
from django.core.management.base import BaseCommand
|
||||
from redis import StrictRedis
|
||||
|
||||
from core.lib.rules import rule_matched
|
||||
from core.lib.rules import rule_notify
|
||||
from core.models import NotificationRule
|
||||
from core.util import logs
|
||||
|
||||
@@ -70,7 +70,7 @@ def process_rules(data):
|
||||
matched_field_number += 1
|
||||
matched[field] = message[field]
|
||||
if matched_field_number == rule_field_length - 2:
|
||||
rule_matched(rule, message, matched)
|
||||
rule_notify(rule, index, message, matched)
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
||||
Reference in New Issue
Block a user