Skip to content

Commit 97133de

Browse files
committed
Update the submission email sequence diagram
We've migrated the forms-runner database to store details about the status of the email delivery for a submission into a separate `deliveries` table. Update the sequence diagram to reflect this change.
1 parent f2e961d commit 97133de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

diagrams/sequence-diagrams/sending-submission-emails.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ break error
7575
end
7676
7777
ses->>worker: return message_id
78-
worker->>runner-db: set mail_message_id on Submission
79-
worker->>runner-db: set the last_delivery_attempt timestamp on Submission
78+
worker->>runner-db: create a Delivery record with the<br/> SES message_id as the delivery_reference
8079
8180
ses-)inbox: send email
8281
note over ses,inbox: happens some time later
@@ -116,15 +115,15 @@ worker->>solidqueue-db: enqueue recurring receive bounces job
116115
worker->>solidqueue-db: dequeue receive bounces job
117116
worker->>sqs: get messages from bounces and complaints queue
118117
alt there is a bounce SQS message
119-
worker->>runner-db: get Submission by the message_id in the SQS message
120-
worker->>runner-db: update delivery_status of Submission to "bounced"
118+
worker->>runner-db: get Delivery where the delivery_reference is the<br/> message_id from the SQS message
119+
worker->>runner-db: set the failed_at timestamp on the Delivery
121120
worker->>worker: Log with the submission details
122121
worker->>sentry: send error event
123122
sentry->>support: Alert via Slack
124123
support->>support: Identify why the email bounced
125124
support->>support: Run rake task to retry submission
126125
else there is a complaint SQS message
127-
worker->>runner-db: get Submission by the message_id in the SQS message
126+
worker->>runner-db: get Delivery where the delivery_reference is the<br/> message_id from the SQS message
128127
worker->>worker: Log with the submission details
129128
end
130129
@@ -152,7 +151,8 @@ actor support as Forms team tech support
152151
worker->>solidqueue-db: enqueue recurring receive deliveries job
153152
worker->>solidqueue-db: dequeue receive deliveries job
154153
worker->>sqs: get messages from deliveries queue
155-
worker->>runner-db: get Submission by the message_id in the SQS message
154+
worker->>runner-db: get Delivery where the delivery_reference is the<br/> message_id from the SQS message
155+
worker->>runner-db: set the delivered_at timestamp on the Delivery
156156
worker->>worker: log a "form_submission_delivered" event
157157
note over worker,runner-db: we don't currently use the "delivered" status for anything other than for information
158158
```

0 commit comments

Comments
 (0)