Get rid of all batch order warnings (#8334)
This commit is contained in:
parent
83746b6364
commit
d98de8ada7
10 changed files with 19 additions and 19 deletions
|
@ -6,7 +6,7 @@ class Scheduler::UserCleanupScheduler
|
|||
sidekiq_options unique: :until_executed
|
||||
|
||||
def perform
|
||||
User.where('confirmed_at is NULL AND confirmation_sent_at <= ?', 2.days.ago).find_in_batches do |batch|
|
||||
User.where('confirmed_at is NULL AND confirmation_sent_at <= ?', 2.days.ago).reorder(nil).find_in_batches do |batch|
|
||||
Account.where(id: batch.map(&:account_id)).delete_all
|
||||
User.where(id: batch.map(&:id)).delete_all
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue