From ab443aaba88b04bb47799275bd241b53692c9288 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 21 Dec 2018 06:16:17 +0100 Subject: [PATCH] Skip mailer job retries when a record no longer exists (#9590) Fix #8666 --- config/initializers/delivery_job.rb | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config/initializers/delivery_job.rb diff --git a/config/initializers/delivery_job.rb b/config/initializers/delivery_job.rb new file mode 100644 index 0000000000..cc29272729 --- /dev/null +++ b/config/initializers/delivery_job.rb @@ -0,0 +1,3 @@ +ActionMailer::DeliveryJob.class_eval do + discard_on ActiveJob::DeserializationError +end