fix(quiz): expire rooms after an hour of inactivity #12

Merged
hmajid2301 merged 1 commit from fix/quiz-idle-ttl into main 2026-11-30 12:02:27 +00:00
Owner

Quiz rooms now expire after 1 hour without activity instead of 24h from creation. A join, answer or host action resets the clock, so a long talk is never cut off, and an abandoned room is gone within the hour.

  • Session.Active is updated in Persist, which runs after every change, and is saved in the snapshot. Older snapshots without it fall back to Created.
  • Expire and Restore use idle time; Redis keys get a fresh 1h TTL on every write.
  • Test: a room created 3h ago but active 30 minutes ago is kept; a room idle for an hour is dropped.
Quiz rooms now expire after **1 hour without activity** instead of 24h from creation. A join, answer or host action resets the clock, so a long talk is never cut off, and an abandoned room is gone within the hour. - `Session.Active` is updated in `Persist`, which runs after every change, and is saved in the snapshot. Older snapshots without it fall back to `Created`. - `Expire` and `Restore` use idle time; Redis keys get a fresh 1h TTL on every write. - Test: a room created 3h ago but active 30 minutes ago is kept; a room idle for an hour is dropped.
fix(quiz): expire rooms after an hour of inactivity
All checks were successful
CI / unit (pull_request) Successful in 1m4s
CI / generate (pull_request) Successful in 1m11s
CI / integration (pull_request) Successful in 2m40s
CI / lint (pull_request) Successful in 1m6s
CI / e2e (pull_request) Successful in 5m47s
CI / ci (pull_request) Successful in 0s
CI / publish (pull_request) Has been skipped
CI / generate (push) Has been skipped
CI / lint (push) Successful in 1m4s
CI / unit (push) Successful in 1m3s
CI / integration (push) Successful in 3m1s
CI / e2e (push) Successful in 6m27s
CI / ci (push) Successful in 0s
CI / publish (push) Successful in 2m14s
8c8344febb
hmajid2301 deleted branch fix/quiz-idle-ttl 2026-11-30 12:02:27 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hmajid2301/banterbus!12
No description provided.