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:
@@ -27141,7 +27141,7 @@
|
||||
"Feedback"
|
||||
],
|
||||
"summary": "Send the feedback form now",
|
||||
"description": "**Who:** Supervisors and admins.",
|
||||
"description": "Answers straight away: `invited` is how many it is going to; the emails go out in the background.\n\n**Who:** Supervisors and admins.",
|
||||
"operationId": "postEventsIdFeedbackSend-now",
|
||||
"security": [
|
||||
{
|
||||
@@ -69877,7 +69877,7 @@
|
||||
"Feedback"
|
||||
],
|
||||
"summary": "Remind people who haven't answered",
|
||||
"description": "A fresh link to everyone who hasn't answered, or to `userIds` (named forms only). Nobody is sent the form or a reminder twice within 24 hours. Without `userIds` it also sends the form to anyone who has become eligible since it went out.\n\n**Who:** Supervisors and admins.",
|
||||
"description": "A fresh link to everyone who hasn't answered, or to `userIds` (named forms only). Nobody is sent the form or a reminder twice within 24 hours. Without `userIds` it also sends the form to anyone who has become eligible since it went out. Answers straight away; the emails go out in the background.\n\n**Who:** Supervisors and admins.",
|
||||
"operationId": "postEventsIdFeedbackRemind",
|
||||
"security": [
|
||||
{
|
||||
@@ -69940,18 +69940,24 @@
|
||||
"reminded": {
|
||||
"type": "integer",
|
||||
"minimum": -9007199254740991,
|
||||
"maximum": 9007199254740991
|
||||
"maximum": 9007199254740991,
|
||||
"description": "Being reminded"
|
||||
},
|
||||
"newlyInvited": {
|
||||
"type": "integer",
|
||||
"minimum": -9007199254740991,
|
||||
"maximum": 9007199254740991
|
||||
"maximum": 9007199254740991,
|
||||
"description": "Being sent the form for the first time"
|
||||
},
|
||||
"skipped": {
|
||||
"type": "integer",
|
||||
"minimum": -9007199254740991,
|
||||
"maximum": 9007199254740991
|
||||
},
|
||||
"queued": {
|
||||
"type": "boolean",
|
||||
"description": "Emails are going out in the background"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -69960,6 +69966,7 @@
|
||||
"reminded",
|
||||
"newlyInvited",
|
||||
"skipped",
|
||||
"queued",
|
||||
"message"
|
||||
],
|
||||
"additionalProperties": false
|
||||
|
||||
+8
-2
@@ -2679,7 +2679,9 @@ export interface paths {
|
||||
put?: never;
|
||||
/**
|
||||
* Send the feedback form now
|
||||
* @description **Who:** Supervisors and admins.
|
||||
* @description Answers straight away: `invited` is how many it is going to; the emails go out in the background.
|
||||
*
|
||||
* **Who:** Supervisors and admins.
|
||||
*/
|
||||
post: operations["postEventsIdFeedbackSend-now"];
|
||||
delete?: never;
|
||||
@@ -7291,7 +7293,7 @@ export interface paths {
|
||||
put?: never;
|
||||
/**
|
||||
* Remind people who haven't answered
|
||||
* @description A fresh link to everyone who hasn't answered, or to `userIds` (named forms only). Nobody is sent the form or a reminder twice within 24 hours. Without `userIds` it also sends the form to anyone who has become eligible since it went out.
|
||||
* @description A fresh link to everyone who hasn't answered, or to `userIds` (named forms only). Nobody is sent the form or a reminder twice within 24 hours. Without `userIds` it also sends the form to anyone who has become eligible since it went out. Answers straight away; the emails go out in the background.
|
||||
*
|
||||
* **Who:** Supervisors and admins.
|
||||
*/
|
||||
@@ -38589,9 +38591,13 @@ export interface operations {
|
||||
content: {
|
||||
"application/json": {
|
||||
data: {
|
||||
/** @description Being reminded */
|
||||
reminded: number;
|
||||
/** @description Being sent the form for the first time */
|
||||
newlyInvited: number;
|
||||
skipped: number;
|
||||
/** @description Emails are going out in the background */
|
||||
queued: boolean;
|
||||
message: string;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user