mirror of
https://github.com/smittix/intercept.git
synced 2026-07-05 08:08:14 -07:00
Prefetch SatNOGS transmitter cache at startup to fix loading delay
This commit is contained in:
@@ -1188,6 +1188,14 @@ def _init_app() -> None:
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to initialize TLE auto-refresh: {e}")
|
||||
|
||||
# Pre-warm SatNOGS transmitter cache so first dashboard load is instant
|
||||
try:
|
||||
if not os.environ.get('TESTING'):
|
||||
from utils.satnogs import prefetch_transmitters
|
||||
prefetch_transmitters()
|
||||
except Exception as e:
|
||||
logger.warning(f"SatNOGS prefetch failed: {e}")
|
||||
|
||||
threading.Thread(target=_deferred_init, daemon=True).start()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user