[offseason] Restore offseason event support (frozen EPA) + freshness ping - #13
Merged
Conversation
The frontend ping resolved to /v3/site/v3/site/ping/... (404) because BACKEND_URL already includes /v3/site — the read-triggered fast path never fired. Also add a (5,30)s timeout to the self-HTTP probe so a hung request cannot wedge _ping_inflight and permanently disable the fast path.
The events list bucketed Ongoing/Upcoming purely off event.status, so an event whose date window has started but whose TBA match schedule is not yet posted (status still Upcoming — common for offseason events on load-in day) matched no bucket and vanished from the list. Bucket by the date window instead: any non-completed event with start_date <= today is Ongoing, future events are Upcoming, and only genuinely finished events are Completed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restores the pre-avgupta456#412 offseason behavior (TBA type-99, year >= 2025, week 9, EventType.OFFSEASON) with the PR avgupta456#400/7a3f7ec quality filters; EPA is never updated by offseason matches; offseason excluded from W-L records and noteworthy matches; EVENT_TYPE_OVERRIDES (2026isrtp -> DISTRICT) preserved and EPA-updating. Adds GET /v3/site/ping/event/{key}: in-memory-cooldown wrapper around the existing /v3/site/update_curr_year probe, pinged fire-and-forget by live event pages. Frontend: Offseason week label + filter option. Tests: pytest suite (20 passing) covering ingestion filter matrix, EPA freeze, record exclusion, ping cooldown.