about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorJeong Arm <kjwonmail@gmail.com>2022-03-19 17:24:08 +0900
committerGitHub <noreply@github.com>2022-03-19 09:24:08 +0100
commit3349cbeb3ed0edc118b5c66270367b3ca03b93b2 (patch)
tree7cd8f704fd36547129de3d8a9daa3bf4a6876324 /app/workers
parentbf846543452f341dd0d96bd3f263ebf0707a8458 (diff)
Fix clean_discarded_statuses (#17822)
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/scheduler/user_cleanup_scheduler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/scheduler/user_cleanup_scheduler.rb b/app/workers/scheduler/user_cleanup_scheduler.rb
index 750d2127b..d1f00c47f 100644
--- a/app/workers/scheduler/user_cleanup_scheduler.rb
+++ b/app/workers/scheduler/user_cleanup_scheduler.rb
@@ -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