@@ -75,8 +75,7 @@ break error
7575end
7676
7777ses->>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
8180ses-)inbox: send email
8281note over ses,inbox: happens some time later
@@ -116,15 +115,15 @@ worker->>solidqueue-db: enqueue recurring receive bounces job
116115worker->>solidqueue-db: dequeue receive bounces job
117116worker->>sqs: get messages from bounces and complaints queue
118117alt 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
126125else 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
129128end
130129
@@ -152,7 +151,8 @@ actor support as Forms team tech support
152151worker->>solidqueue-db: enqueue recurring receive deliveries job
153152worker->>solidqueue-db: dequeue receive deliveries job
154153worker->>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
156156worker->>worker: log a "form_submission_delivered" event
157157note over worker,runner-db: we don't currently use the "delivered" status for anything other than for information
158158```
0 commit comments