mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 23:54:16 +08:00
Load user records in batches.
This commit is contained in:
parent
1b526ebd91
commit
50c8ae2c10
|
@ -33,7 +33,7 @@ module Jobs
|
|||
WHERE cu.category_id = ? AND cu.user_id = users.id AND cu.notification_level = ?
|
||||
)', post.topic.category_id, CategoryUser.notification_levels[:muted])
|
||||
|
||||
users.each do |user|
|
||||
users.find_each do |user|
|
||||
if Guardian.new(user).can_see?(post)
|
||||
if EmailLog.reached_max_emails?(user)
|
||||
skip(user.email, user.id, post.id, I18n.t('email_log.exceeded_emails_limit'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user