Skip to content

src/dazzle_back/runtime/sla_manager.py

Generated: 2026-03-30T04:38:48.293063+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

SLA runtime enforcement — timer tracking, breach detection, escalation.

Listens to entity lifecycle events (via CRUDService callbacks) and tracks SLA timers in memory. A periodic background task checks for tier transitions and executes breach actions (field updates + notifications).

Architecture:...

Key Exports

  • SLATimer
  • parse_schedule
  • business_seconds
  • SLAManager
  • active_timer_count
  • get_timer
  • start
  • shutdown
  • on_entity_event
  • check_breaches

Dependencies

Imports

  • __future__.annotations
  • asyncio
  • logging
  • time
  • dataclasses.dataclass
  • datetime.UTC
  • datetime.datetime
  • datetime.timedelta
  • datetime.tzinfo
  • typing.TYPE_CHECKING
  • typing.Any
  • dazzle.core.ir.sla.SLAConditionSpec
  • dazzle.core.ir.sla.SLATierSpec
  • zoneinfo.ZoneInfo
  • dazzle.core.ir.sla.SLASpec

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_sla_manager.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.