Skip to content

feat: auto-terminate active quizzes after 24 hours#245

Merged
smitdodiya merged 1 commit into
mainfrom
feat/quiz-auto-termination-24h
Jun 19, 2026
Merged

feat: auto-terminate active quizzes after 24 hours#245
smitdodiya merged 1 commit into
mainfrom
feat/quiz-auto-termination-24h

Conversation

@smitdodiya

Copy link
Copy Markdown
Member

Issue:
Auto-Expire Stale Quiz Sessions After 24 Hours.
https://station.improwised.com/epp/tasks/view/kanban?view=1#IP-117

What this PR does:

  • Added ACTIVE_QUIZ_TTL_HOURS config to control how long an active quiz can run.
  • Added ACTIVE_QUIZ_SWEEP_MINUTES config to control how often expired quizzes are checked.
  • Started a background sweeper when the API server runs.
  • Added DeactivateExpired() in the active quiz model to deactivate quizzes older than the configured TTL.
  • Expired quizzes now clear:
    • invitation code
    • active status
    • current question
    • question active state
    • activated end time

@smitdodiya smitdodiya merged commit cafda19 into main Jun 19, 2026
2 checks passed
@smitdodiya smitdodiya deleted the feat/quiz-auto-termination-24h branch June 19, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant