0
0
Fork 0

Fix Rails/WhereRange cop (#30343)

This commit is contained in:
Matt Jankowski 2024-05-20 05:37:36 -04:00 committed by GitHub
parent 70608f824e
commit def6b686ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 15 additions and 15 deletions

View file

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