Don`t queue email sending when notifier is off #16528
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
continuation of #14801
Issue
when is press check compliance (point 11 in BZ) it start lot of queuing, doing work.
first it is starting by raising event https://github.com/ManageIQ/manageiq/blob/master/app/models/compliance.rb#L89
and it is process by automate engine, he will plan other work in MiqQueue,...
one this planning is about putting to MiqQueue item which is saying
send an email
. So I put guard condition here because previously it was putting this messages to queue and when notifier role have been turned on, that it was doing these messages for send emailing.so I think we shouldn't queue in this place.
but guard condition here is also ok #14801 because
user can plan events when notifier is on, but after it somebody can turn off role and in this case it should not also send emails.
@miq-bot assign @gtanzillo
@miq-bot add_label bug
Links
https://bugzilla.redhat.com/show_bug.cgi?id=1399157
first part #14801