-
Notifications
You must be signed in to change notification settings - Fork 0
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
improve the email delivery to not send emails like we do now #171
Conversation
@Panioglo there is also an issue that we are not looking at the notification settings defined per website right now. We are sending those emails even if we change the notification settings so there should be a fix for that here too! |
Current coverage is 93.15%@@ master #171 diff @@
==========================================
Files 183 183
Lines 5099 5140 +41
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 4752 4788 +36
- Misses 347 352 +5
Partials 0 0
|
return all_headers if header.nil? | ||
all_headers.find { |h| h[header] }.try(:values).try(:first) | ||
end | ||
|
||
def http_data(key = nil) | ||
all_data = get_interfaces(:http)._data | ||
return '<no information>' if all_data.blank? |
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.
same thing here with this '' message. Why do you need this?
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.
In the image you gave me, I remember there was a message in the error occurred email in the Url section.
This was my approach
%p.gray_text Url
%pre
%code
%small #{@issue.http_data(:url)}
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.
Ok i guess we can keep it then
Website.joins(:grouped_issues).where('grouped_issues.updated_at > ?', date).uniq.each do |website| | ||
GroupedIssueMailer.notify_daily(website).deliver_later | ||
def self.custom_report(date, field) | ||
WebsiteMember.where("website_members.#{field} = ?", true).joins(website: :grouped_issues).where('grouped_issues.updated_at > ? AND muted = ?', date, false).uniq.each do |member| |
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.
for these use ... .find_each(batch_size: 500) do |member|
so if we are going to have a gazillion number of users we will get them in batches of 500.
875ef32
to
2c0d56b
Compare
2c0d56b
to
096b7c4
Compare
096b7c4
to
e8c7523
Compare
Fixes #157, #167, #170