Skip to content

Commit 814033f

Browse files
Merge pull request #1441 from alphagov/stop-using-delivered-mail-status
Stop using delivered mail status
2 parents 1c5cf61 + 8af896e commit 814033f

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

app/jobs/receive_submission_deliveries_job.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def process_messages(sqs_client, queue_url, messages)
7676
def process_delivery(submission)
7777
set_submission_logging_attributes(submission)
7878

79-
submission.delivered!
8079
EventLogger.log_form_event("submission_delivered")
8180
end
8281
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class UpdateMailStatusForPendingSubmissions < ActiveRecord::Migration[8.0]
2+
def change
3+
Submission.where(mail_status: :delivered).update_all(mail_status: :pending)
4+
end
5+
end

db/schema.rb

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/jobs/receive_submission_deliveries_job_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@
9090
allow(CloudWatchService).to receive(:record_submission_delivery_latency_metric)
9191
end
9292

93-
it "updates the submission mail status to delivered" do
94-
perform_enqueued_jobs
95-
expect(submission.reload.delivered?).to be true
96-
end
97-
9893
it "doesn't change the mail status for other submissions" do
9994
perform_enqueued_jobs
10095
expect(other_submission.reload.bounced?).to be true

0 commit comments

Comments
 (0)