From 968e92c153ff6333a303467d4affab68623d6e9d Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 10 Feb 2020 15:18:50 -0600 Subject: move `instance_actor` & `actor_type` check to correct model --- app/workers/scheduler/janitor_scheduler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/workers/scheduler') 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 -- cgit