Player awards are never recalculated #422
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.
Dependencies
No dependencies set
Reference
johnsturgeon/tgfp-web#422
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?
What's wrong
update_all_awards()(app/jobs/award_update_all.py:100) has no callers.Nothing schedules it and nothing invokes it, so no award is being recalculated
and no award notification is reaching Discord.
Production confirms it. On the last deploy APScheduler found the one remaining
update_awardsrow in its jobstore pointing at a function that no longerexists, and dropped it:
That row was the last thing that would have run it.
Impact
Perfect Week, In Your Face, Quick Pick and Won The Week stop being awarded.
send_award_notification()runs only at the tail ofupdate_all_awards(), sothe Discord webhook goes quiet as well.
Nothing is lost permanently — every award is recomputed from picks and games
on each run, so they reappear as soon as something calls it again.
Fix
Trigger it where the underlying data actually changes:
newly_finaltransition insync_scores_for_current_week.py:85,beside
update_player_records. Every award derives from completed games, soa game going final is the only event that can change one mid-week.
_schedule_sync_team_records,as a backstop for anything the transition misses — a game that goes final
while the app is down, say.
Done when
Awards update within a minute of a game going final, the Discord webhook fires
again, and an integrity test fails if a scheduled job reference stops
resolving.
forgejo-actions referenced this issue2026-08-25 09:48:20 +02:00
johnsturgeon referenced this issue2026-08-25 14:13:42 +02:00