lib/sidekiq/extensions/action_mailer.rb in sidekiq-2.10.1 vs lib/sidekiq/extensions/action_mailer.rb in sidekiq-2.11.0
- old
+ new
@@ -9,12 +9,9 @@
# UserMailer.delay.send_welcome_email(new_user)
# UserMailer.delay_for(5.days).send_welcome_email(new_user)
# UserMailer.delay_until(5.days.from_now).send_welcome_email(new_user)
class DelayedMailer
include Sidekiq::Worker
- # I think it's reasonable to assume that emails should take less
- # than 30 seconds to send.
- sidekiq_options :timeout => 30
def perform(yml)
(target, method_name, args) = YAML.load(yml)
msg = target.send(method_name, *args)
# The email method can return nil, which causes ActionMailer to return