Skip to content

Commit

Permalink
Dumb down ActionMailer integration, fixes sidekiq#2149
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Jan 23, 2015
1 parent f074cce commit a7ddb44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changes.md
@@ -1,5 +1,7 @@
HEAD
-----------

- Dumb down ActionMailer integration so it tries to deliver if possible [#2149]
- Stringify Sidekiq.default_worker_options's keys [#2126]
- Add random integer to process identity [#2113, michaeldiscala]
- Log Sidekiq Pro's Batch ID if available [#2076]
Expand Down
6 changes: 5 additions & 1 deletion lib/sidekiq/extensions/action_mailer.rb
Expand Up @@ -17,7 +17,11 @@ def perform(yml)
msg = target.public_send(method_name, *args)
# The email method can return nil, which causes ActionMailer to return
# an undeliverable empty message.
deliver(msg) if msg && (msg.to || msg.cc || msg.bcc) && msg.from
if msg
deliver(msg)
else
logger.warn("#{target.name}##{method_name} returned an undeliverable mail object")
end
end

private
Expand Down

0 comments on commit a7ddb44

Please sign in to comment.