Files
esp32-cluster/coordinator
bot 36c7248d0e Fix dashboard latency and add DB pruning
- Wrap all build_* route calls in asyncio.to_thread() so SQLite queries
  run in a thread pool instead of blocking the event loop. Fixes tab
  switch freezes and SSE stream stalls.
- Add 60s TTL caches to alerts, sessions, presence, and cross-node
  endpoints (previously uncached, queried on every request).
- Scope alerts queries (top targets, devices, reason breakdown, heatmap)
  to last 7 days instead of all-time full table scans.
- Add composite indexes: (bssid, received_at) on beacon_events and
  deauth_events, (src_mac, received_at) on probe_events.
- Add background pruning task: runs every 6 hours, deletes events older
  than HOT_DAYS from all tables, followed by WAL checkpoint.
- Document the full diagnosis and fixes in README.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 13:01:13 +03:00
..
2026-04-05 13:06:25 +03:00
2026-04-05 20:59:22 +03:00
2026-04-03 14:38:38 +03:00
2026-04-03 14:38:38 +03:00
2026-04-03 14:38:38 +03:00
2026-04-05 13:06:25 +03:00
2026-04-03 14:38:38 +03:00