fix: ensure poll unpins reliably and remove duplicate quiz
- Remove the extra Wednesday 16:19 send_quiz job; only the Friday 17:00 quiz remains, matching the /start description. The duplicate send overwrote the poll mapping, orphaning the earlier pinned poll so it was never unpinned. - Extract unpinPoll() and call it at the start of CreatePairs so the poll is always unpinned, even when no pairs can be formed (previously early returns skipped the unpin block entirely). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -206,8 +206,6 @@ func startScheduler(db *sql.DB, api echotron.API, stopChan chan struct{}) {
|
||||
// Friday 17:00 - send quiz
|
||||
scheduleJob("send_quiz", time.Friday, 17, 0, SendQuizToAllGroups, db, api, stopChan, moscowTZ)
|
||||
|
||||
scheduleJob("send_quiz", time.Wednesday, 16, 19, SendQuizToAllGroups, db, api, stopChan, moscowTZ)
|
||||
|
||||
// Sunday 19:00 - create pairs
|
||||
scheduleJob("create_pairs", time.Sunday, 19, 0, CreatePairsForAllGroups, db, api, stopChan, moscowTZ)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user