feat: always notify agent.lifecycle via SAC with telegram_via routing
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,7 +17,13 @@ from app.schemas.list_models import EventDetail, EventListResponse, EventSummary
|
||||
from app.services.ingest import ingest_event
|
||||
from app.services.problems import maybe_create_problem
|
||||
from app.services.schema_validate import validate_event_payload
|
||||
from app.services.notify_dispatch import notify_daily_report, notify_event, notify_problem
|
||||
from app.services.notify_dispatch import (
|
||||
LIFECYCLE_EVENT_TYPE,
|
||||
notify_daily_report,
|
||||
notify_event,
|
||||
notify_lifecycle,
|
||||
notify_problem,
|
||||
)
|
||||
|
||||
DAILY_REPORT_EVENT_TYPES = frozenset({"report.daily.ssh", "report.daily.rdp"})
|
||||
|
||||
@@ -68,6 +74,8 @@ def post_event(
|
||||
problem, problem_created = maybe_create_problem(db, event)
|
||||
if event.type in DAILY_REPORT_EVENT_TYPES:
|
||||
notify_daily_report(event, db=db)
|
||||
elif event.type == LIFECYCLE_EVENT_TYPE:
|
||||
notify_lifecycle(event, db=db)
|
||||
else:
|
||||
notify_event(event, db=db)
|
||||
if problem is not None and problem_created:
|
||||
|
||||
Reference in New Issue
Block a user