-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a deliver!
version of GenericMailer.deliver
#23037
Conversation
deliver!
version of GenericMailer.deliver
deliver!
version of GenericMailer.deliver
Add a version of `GenericMailer.deliver` which raises exceptions on failure.
f9a6037
to
7c77e60
Compare
Checked commits agrare/manageiq@9beea07~...7c77e60 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
deliver!
version of GenericMailer.deliver
deliver!
version of GenericMailer.deliver
@miq-bot cross-repo-test manageiq-ui-classic, manageiq-api, manageiq-content, manageiq-automation_engine |
From Pull Request: ManageIQ/manageiq#23037
From Pull Request: ManageIQ/manageiq#23037
# catch delivery errors if raised, | ||
rescue Net::SMTPError => e | ||
msg.deliver_now! | ||
rescue Net::SMTPError => e # catch delivery errors if raised |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought rubocop prefers comments above the line
rescue => e # catch delivery errors if raised, | ||
_log.error("method: #{method} options: #{options} delivery-error #{e}") | ||
end | ||
|
||
def self.deliver_queue(method, options = {}, queue_options = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming this is ok but it is kind of deliver_queue!
@Fryguy Is this good to go? |
cross-repo failed on the automation engine - not sure if related or not |
@miq-bot cross-repo-test manageiq-ui-classic, manageiq-api, manageiq-content, ManageIQ/manageiq-automation_engine#548 |
From Pull Request: ManageIQ/manageiq#23037
ManageIQ/manageiq-automation_engine#548 fixes the automation_engine failure |
Cross repo is green now |
Backported to
|
Add a `deliver!` version of `GenericMailer.deliver` (cherry picked from commit 671a04b)
Add a version of
GenericMailer.deliver
which raises exceptions on failure and have the "async" queue/task methods call this. This should allow for us to get an error on the miq_task if delivery failed.