Add phase 4 registration and renewal lifecycle management
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user