feat: runtime bootstrap snapshot cache with backoff

This commit is contained in:
Noel Sabia committed 2026-11-14 06:08:53 +01:00
1 parent 08f60a14d1
commit aa6bb23e24
19 files changed
+1400 -384

No files matched your search

+8
View File
@@ -83,6 +83,14 @@ func (s *Server) refreshSimulation(state model.ScenarioState) {
s.simFor = state.Scenario.Scenario
s.simGen++
s.staffing = make(map[string]model.StaffingResponse)
for sensorID, horizons := range forecasts {
for horizon, points := range horizons {
if len(points) == 0 {
continue
}
s.lastForecast[forecastKey(sensorID, horizon, state.Scenario.Scenario)] = sortedForecast(points)
}
}
s.mu.Unlock()
}