Add voice analytics filters and metrics

This commit is contained in:
2026-04-26 22:00:34 +08:00
parent 3805c18622
commit 55ca0985eb
25 changed files with 710 additions and 39 deletions

View File

@@ -10,6 +10,7 @@ from app.core.celery_app import celery_app
from app.core.logging import get_logger
from app.db.database import _get_session_factory
from app.db.models import PushConfig, PushEvent
from app.tasks.utils import run_with_disposed_engine
logger = get_logger(__name__)
@@ -22,7 +23,7 @@ TRIGGER_WINDOW_MINUTES = 30
@celery_app.task
def check_push_notifications() -> None:
"""Check push configs and create push events."""
asyncio.run(_check_push_notifications())
asyncio.run(run_with_disposed_engine(_check_push_notifications()))
def _is_quiet_hours(current: time) -> bool: