mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
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:
parent
ea7931496c
commit
61f6c99f93
2 changed files with 5 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue