Phase 5 — Independent job fixes #411
Labels
No labels
Kestra
bug
enhancement
someday
subtask
☁️ api
🎛️ infrastructure
🐞 sentry
📆 2025 Season
📝 pages
allpicks
📝 pages
picks
📝 pages
standings
🚀 performance
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#406 Resolve the technical debt issues that remain for the
week table issue
johnsturgeon/tgfp-web
Reference
johnsturgeon/tgfp-web#411
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #406
Why
None of these block anything else in the epic and they have no ordering
constraint between them. Good filler when another phase is blocked on review.
Each is its own PR.
Tasks
NflApi.games(
tank01_api.py:256) unconditionally callsself.odds_data, which loops/getNFLBettingOddsonce per distinct game date — 3–4 calls every timeanything just wants kickoff times. Once
odds_stateexists (#408) alocked week never wants odds again, but flex scheduling means the
schedule still gets re-fetched all week. A flag or a separate property is
enough; callers that want both are unaffected.
Bites: every poll of a locked week, on a metered plan.
sync_team_recordsper-team error handling.nfl.find_teams(team_id=...)[0]raisesIndexErroron an unmatched idand takes out the whole sync rather than one team.
Bites: a provider renaming or dropping a team id.
update_player_recordshandles inactive players. It zeroes andrecomputes only
Player.active_players(), so an inactive player keepswhatever totals they had when they were deactivated — forever, including
across a season rollover where the columns are supposed to reset.
Bites: whenever an inactive player's record is displayed.
sync_won_the_weekguard on empty picks. It sorts players bywins_for_weekand compares the top two with no check that any picksexist. It survives a zero-pick week only because
0 > 0is false — theone award path relying on arithmetic rather than an explicit guard.
Removed
BatchSuperseded by #410: per-game_update_one_game's API calls.jobs became a single live-games job, so the ~16× multiplier stops existing
rather than getting optimized. Do not fix here — it would be thrown away.
Admin unlock escape hatch.Dropped to a single guarded setter in#410 — flip
odds_state, refuse if picks exist, log it. No unlock state totrack, so nothing to build.
Done when
Each is closed by its own PR. There is no combined acceptance criterion.
weektable issueweektable issue #406Reviewed all the tasks, and moved the only one I think is relevant to a new task