Refit Team-DC once more after boot ingestion settles
The boot refit fires before live state is restored, so restarts lost this tournament's matches from the fit until the nightly timer. A one-shot follow-up at +5 minutes closes the gap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -229,7 +229,12 @@ export function buildServer() {
|
||||
const refitTimer = setInterval(() => {
|
||||
if (model.refitTeamDc(state.allFixtures())) broadcast();
|
||||
}, 24 * 60 * 60 * 1000);
|
||||
app.addHook('onClose', async () => clearInterval(refitTimer));
|
||||
// The boot refit ran before ingestion restored finished matches — run once
|
||||
// more after the boot sweep settles so a restart keeps tournament context.
|
||||
const refitOnce = setTimeout(() => {
|
||||
if (model.refitTeamDc(state.allFixtures())) broadcast();
|
||||
}, 5 * 60_000);
|
||||
app.addHook('onClose', async () => { clearInterval(refitTimer); clearTimeout(refitOnce); });
|
||||
|
||||
// ---- static SPA (prod) with history fallback + per-route OG meta ----
|
||||
if (existsSync(STATIC_DIR)) {
|
||||
|
||||
Reference in New Issue
Block a user