Much fresher live data: 8s in-play polling, live-TTL summary fetches
The live staleness bug: liveTick refetched ESPN summaries every 20s but the cache TTL was 5 minutes, so in-play stats/timeline barely moved. Summaries now take a live flag (15s TTL in play), the scoreboard TTL drops 20s->5s, and polling gets three tiers (8s in-play / 20s near kickoff / 10m idle) via a pure, tested cadence module. The football-data fallback is throttled to one attempt per 15s so the 8s cadence can never breach its 10 req/min cap. Enrichment runs every 5m (was 20m); client refetch intervals tighten to 10s (live match page) and 30s (scoreboard). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,11 @@ export class TournamentState {
|
||||
);
|
||||
}
|
||||
|
||||
/** True only while a match is actually in play. */
|
||||
hasLive(): boolean {
|
||||
return this.fixtures.some((f) => f.status === 'live');
|
||||
}
|
||||
|
||||
/** Directly set a fixture's score/status (used by the dev injection endpoint). */
|
||||
applyScore(
|
||||
num: number,
|
||||
|
||||
Reference in New Issue
Block a user