Add phase 4 registration and renewal lifecycle management

This commit is contained in:
A R R R Associates
2026-07-23 12:05:41 +05:30
parent 0f7d6f4396
commit 929ed26737
14 changed files with 507 additions and 0 deletions
+8
View File
@@ -167,6 +167,14 @@ def run_notification_escalation_once(*, db: Session | None = None, now: datetime
result = AutomationResult()
try:
# Phase 4: materialize registration renewal/update work before alert processing.
try:
if _table_exists("registration_renewal_tasks"):
from app.modules.registrations.service import run_registration_lifecycle_once
run_registration_lifecycle_once(session, today=now_utc.date())
except Exception:
logger.exception("Registration lifecycle automation failed")
if not _table_exists("user_alerts"):
logger.warning("Phase 7O skipped: user_alerts table is not available. Apply Phase 7H first.")
return result