Runtime tasks: refresh last_run_at when alarm/inventory sync starts

Avoid stale last_run_at when sync_alarms_current runs longer than interval; clarifying tooltip on UME page.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-12 10:18:30 +08:00
parent ea7931496c
commit 61f6c99f93
2 changed files with 5 additions and 1 deletions

View file

@ -449,6 +449,7 @@ def on_startup() -> None:
_set_runtime_task(
"alarms_current_auto_sync",
status="running",
last_run_at=datetime.now(timezone.utc),
last_error="正在拉取 UME 当前告警…",
)
db = SessionLocal()
@ -491,6 +492,7 @@ def on_startup() -> None:
_set_runtime_task(
"inventory_auto_sync",
status="running",
last_run_at=datetime.now(timezone.utc),
last_error="正在拉取 UME 网元清单…",
)
db = SessionLocal()