mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Dumb down ActionMailer integration, fixes #2149
This commit is contained in:
parent
f074cce972
commit
a7ddb44abb
2 changed files with 7 additions and 1 deletions
|
@ -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]
|
||||
|
|
|
@ -17,7 +17,11 @@ module Sidekiq
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue