Skip to content

Commit 93a13f1

Browse files
committed
Retry mailer jobs on Net::ReadTimeout
ref: https://app.fizzy.do/5986089/cards/3300
1 parent 2fcdd92 commit 93a13f1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

app/jobs/notification/bundle/deliver_job.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
class Notification::Bundle::DeliverJob < ApplicationJob
22
queue_as :backend
33

4+
retry_on Net::ReadTimeout
5+
46
def perform(bundle)
57
bundle.deliver
68
end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module ActionMailerMailDeliveryJobExtension
2+
extend ActiveSupport::Concern
3+
4+
included do
5+
# ref: https://app.fizzy.do/5986089/cards/3300
6+
retry_on Net::ReadTimeout
7+
end
8+
end
9+
10+
ActiveSupport.on_load :action_mailer do
11+
ActionMailer::MailDeliveryJob.include ActionMailerMailDeliveryJobExtension
12+
end

0 commit comments

Comments
 (0)