Keysat 9439154c25 Tighten license-poll cadence; add opportunistic online refresh
Three changes that together make license state changes feel
near-instant in the UI without burning real I/O / network budget:

  1. File-poll interval: 30s → 5s
     Action-set keys (via "Set Recap License") get picked up almost
     immediately. Cost: a single stat per file every 5s, negligible.

  2. Online validation interval: 6h → 30min
     A license revoked on Keysat now flips to invalid within 30 min
     worst-case, instead of sitting unnoticed for hours. Bounded
     latency makes revocation usable in production.

  3. Opportunistic online refresh on /api/license-status
     If the cached LIC was last validated more than 10 min ago, fire
     validateOnline() in the background (non-blocking) when the web
     UI hits the status endpoint. Since the UI hits status on every
     page load, revocations get caught the next time anyone opens
     the app — usually well under the scheduled 30 min tick.

Three new env vars for tuning:
  RECAP_LICENSE_FILE_POLL_MS         (default 5000)
  RECAP_VALIDATE_INTERVAL_MS         (default 1800000)
  RECAP_OPPORTUNISTIC_REFRESH_MS     (default 600000)
2026-05-09 19:36:46 -05:00
2026-05-09 11:57:58 -05:00
2026-04-09 15:03:31 -05:00
2026-04-09 15:03:31 -05:00
2026-04-09 15:03:31 -05:00
2026-04-09 15:03:31 -05:00
2026-04-09 15:03:31 -05:00
S
Description
No description provided
52 MiB
Languages
JavaScript 45.6%
HTML 39.3%
TypeScript 13.4%
Shell 1.2%
Makefile 0.3%
Other 0.2%