fix: dedupe daily report Telegram in dual mode and show host in summary fallback

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
PTah
2026-06-03 09:15:21 +10:00
parent 3053058cdf
commit 0d4a50cd35
4 changed files with 93 additions and 3 deletions
+5 -2
View File
@@ -75,11 +75,14 @@ def _dispatch_lifecycle_channels(event: Event, *, db: Session | None, policy) ->
def notify_daily_report(event: Event, *, db: Session | None = None) -> None:
"""Оповещение по суточному отчёту (severity=info, вне порога policy)."""
"""Оповещение по суточному отчёту (severity=info, вне порога policy).
При UseSAC=dual агент шлёт TG сам (telegram_via=agent) — SAC не дублирует.
"""
policy = get_effective_notification_policy(db)
if not should_notify_event(event, db):
return
_dispatch_event_channels(event, db=db, policy=policy)
_dispatch_lifecycle_channels(event, db=db, policy=policy)
def notify_lifecycle(event: Event, *, db: Session | None = None) -> None: