fix(quiz): persist sessions to Redis and restore them on startup #11
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/quiz-persist"
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?
Quiz rooms only lived in memory, so any restart or deploy deleted live rooms mid-talk: the presenter got a 404 and the deck dropped to "Live quiz off" (2026-11-30 11:28, room
03cf6c9d…, during a banterbus deploy).Quiz sessions are now written through to Redis after every change, and restored into the store at startup, matching the other games that already recover from Postgres after a restart.
internal/quiz/snapshot.go) holds the quiz, players, scores, answers per round, current stage and join token. Keys arequiz:session:<id>and expire withSessionTTL, which is 24h from creation.player_idcookie.The answer timer keeps running during the restart, so a question that was open will be closed if the restart takes longer than the 15 seconds left.