SMS workflow reminder retry count tracking#8
Conversation
* add retry count to workflow reminder * add logic to for retry count --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2dae0bfb8c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| retryCount: { | ||
| gt: 1, | ||
| }, |
There was a problem hiding this comment.
Preserve scheduled reminders after successful retries
The new retryCount > 1 deletion branch removes any reminder with two failures regardless of whether it was later scheduled successfully, because retryCount is never reset on success. This means a reminder that eventually schedules (after a couple of transient Twilio failures) will be deleted on the next cron run even if its scheduledDate is still in the future; when a booking is canceled before that date, handleCancelBooking/cancelWorkflowReminders will no longer have a workflowReminder record (and referenceId) to cancel the already-scheduled SMS, so users can still receive SMS for canceled bookings. Consider scoping the deletion to unscheduled reminders or resetting retryCount on success.
Useful? React with 👍 / 👎.
Test 9nn---nReplicated from ai-code-review-evaluation/cal.com-cursor#9