GYR1-977-allow-returning-file-myself-users-to-navigate-to-tax-slayer-without-error#6239
Conversation
|
Heroku app: https://gyr-review-app-6239-0a43e1abc58e.herokuapp.com/ |
|
@DrewProebstel i guess I'm worried about the case where we are batching emails and the batches that are creating the emails overlap. So you have the some of the same contacts in both batches. Before when we had this uniqueness constraint it would catch these and never create duplicate emails by message name for the same client. Now it could theoretically? I wonder if we could add something similar to what we have in the automated messages controller like |
|
|
||
| return if existing_send_count >= 2 | ||
|
|
||
| CampaignEmail.create!( |
There was a problem hiding this comment.
check for exisitng message and see if scheduled_send_at has already passed before trying to send one
Only create a second campaign email once the first has left the in-progress state (delivered/failed), preventing back-to-back sends. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
I think this like would keep duplicate emails from being batched at the same time rather than checking them in the job since if they are in different batches we may not pick up on the fact that they are duplicated. I added the uniqueness restraint back to the |
| sent_count = CampaignEmail.where( | ||
| campaign_contact_id: email.campaign_contact_id, | ||
| message_name: email.message_name | ||
| ).where.not(sent_at: nil).count |
There was a problem hiding this comment.
maybe down the line we would also check for a successful delivery but we don't have to worry about that now probably
Link to pivotal/JIRA issue
Is PM acceptance required? (delete one)
Reminder: merge main into this branch and get green tests before merging to main
What was done?
How to test?