about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-10 15:18:50 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-10 15:18:50 -0600
commit968e92c153ff6333a303467d4affab68623d6e9d (patch)
tree38377ad75698d431a81e727122b48d52df33d7ef /app/workers
parent73fc76b7a3636b57865dfbe989fab245687f6c20 (diff)
move `instance_actor` & `actor_type` check to correct model
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/scheduler/janitor_scheduler.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/scheduler/janitor_scheduler.rb b/app/workers/scheduler/janitor_scheduler.rb
index d1ac56457..c4212e9f5 100644
--- a/app/workers/scheduler/janitor_scheduler.rb
+++ b/app/workers/scheduler/janitor_scheduler.rb
@@ -97,11 +97,11 @@ class Scheduler::JanitorScheduler
   end
 
   def abandoned_accounts
-    Account.reorder(nil).where(id: abandoned_account_ids)
+    Account.reorder(nil).where(id: abandoned_account_ids, instance_actor: false, actor_type: %w(Person Group))
   end
 
   def abandoned_users
-    User.select(:account_id).where(admin: false, moderator: false, instance_actor: false, actor_type: %w(Person Group)).where('last_sign_in_at < ?', 1.month.ago)
+    User.select(:account_id).where(admin: false, moderator: false).where('last_sign_in_at < ?', 1.month.ago)
   end
 
   def excluded_domains