mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 10:40:46 +08:00
Add period and cross-task interface compare for port traffic wall.
Compare by interface target_id with optional mapped baseline (same window or time-shifted), keep chart samples on target_row_id, and unify UI wording to interface. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
0d85b87be7
commit
653baa1b9f
16 changed files with 1185 additions and 129 deletions
|
|
@ -813,8 +813,11 @@ def on_startup() -> None:
|
|||
"ALTER TABLE app_user ADD COLUMN IF NOT EXISTS must_change_password BOOLEAN DEFAULT FALSE"
|
||||
)
|
||||
conn.exec_driver_sql("ALTER TABLE api_token ADD COLUMN IF NOT EXISTS expires_at TIMESTAMP")
|
||||
from .port_traffic_migrate import ensure_port_traffic_series_schema
|
||||
|
||||
ensure_port_traffic_series_schema(conn)
|
||||
except Exception:
|
||||
_schedule_log.exception("startup: auth schema migration failed")
|
||||
_schedule_log.exception("startup: auth/port_traffic schema migration failed")
|
||||
_reset_runtime_pause_flags()
|
||||
_fail_stale_running_sync_jobs_on_startup()
|
||||
if _needs_startup_alarm_sync_before_ws():
|
||||
|
|
@ -847,6 +850,12 @@ def on_startup() -> None:
|
|||
pt_cleared = recover_port_traffic_on_startup(db)
|
||||
if pt_cleared:
|
||||
_schedule_log.info("startup: cleared %s port_traffic stuck collect_running flag(s)", pt_cleared)
|
||||
try:
|
||||
from .port_traffic_migrate import backfill_port_traffic_series
|
||||
|
||||
backfill_port_traffic_series(db)
|
||||
except Exception:
|
||||
_schedule_log.exception("startup: port_traffic series backfill failed")
|
||||
except Exception:
|
||||
_schedule_log.exception("startup: ne collection / config_sync recovery failed")
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue