mirror of
https://github.com/discourse/discourse.git
synced 2026-08-13 14:35:08 -05:00
DEV: replace .each with .find_each for paginated queries (#27159)
Large batches of reviewables may require paginated queries.
This commit is contained in:
@@ -12,7 +12,7 @@ module Jobs
|
||||
Reviewable
|
||||
.pending
|
||||
.where("created_at < ?", SiteSetting.auto_handle_queued_age.to_i.days.ago)
|
||||
.each do |reviewable|
|
||||
.find_each do |reviewable|
|
||||
if reviewable.is_a?(ReviewableFlaggedPost)
|
||||
reviewable.perform(Discourse.system_user, :ignore_and_do_nothing, expired: true)
|
||||
elsif reviewable.is_a?(ReviewableQueuedPost)
|
||||
|
||||
Reference in New Issue
Block a user