Fix clean_discarded_statuses (#17822)

This commit is contained in:
Jeong Arm 2022-03-19 17:24:08 +09:00 committed by GitHub
parent bf84654345
commit 3349cbeb3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ class Scheduler::UserCleanupScheduler
end
def clean_discarded_statuses!
Status.discarded.where('deleted_at <= ?', 30.days.ago).find_in_batches do |statuses|
Status.unscoped.discarded.where('deleted_at <= ?', 30.days.ago).find_in_batches do |statuses|
RemovalWorker.push_bulk(statuses) do |status|
[status.id, { 'immediate' => true }]
end