Feedback Send now and Remind run in the background (2.1.1)
- Send now and Remind answer straight away with who they're going to and queue the feedback-send task; the Feedback page refreshes to show progress. - One-off background tasks (enqueueTask in src/jobs/index.js): pg-boss with retries, or in-process after the response when the queue is off. - Reminders are claimed with the 24-hour rule, so two tasks at once never remind the same person twice. - Tests: tests/tasks.test.js, tests/feedbackPage.test.ts, e2e/feedback.spec.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,25 @@ and this project follows [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.1.1] - 2026-11-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Feedback "Send now" and "Remind" no longer make the page wait** for every email: they work out
|
||||
who they're going to, answer straight away ("Sending the feedback form to 40 people in the
|
||||
background", "Reminding 12 people. It carries on in the background.") and the emails go out in a
|
||||
background task. The Feedback page refreshes itself a few times to show them land.
|
||||
|
||||
### Added
|
||||
|
||||
- **One-off background tasks** (`enqueueTask` in `src/jobs/index.js`, first one `feedback-send` →
|
||||
`runFeedbackTask` in `utils/feedback.js`): queued in pg-boss (retried twice, kept across a
|
||||
restart), or run in-process straight after the response when the queue isn't running. Tasks must
|
||||
be safe to run twice: sending skips people already invited, and a reminder is claimed with the
|
||||
24-hour rule, so two tasks at once never remind the same person twice.
|
||||
- `POST /api/v2/events/{id}/feedback/remind` answers with `queued`; its counts are what's being
|
||||
sent. `send-now`'s `invited` is how many it's sending to.
|
||||
|
||||
## [2.1.0] - 2026-11-03
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user