diff options
Diffstat (limited to 'app/lib/vacuum')
-rw-r--r-- | app/lib/vacuum/feeds_vacuum.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/lib/vacuum/feeds_vacuum.rb b/app/lib/vacuum/feeds_vacuum.rb index f46bcf75f..00b9fd646 100644 --- a/app/lib/vacuum/feeds_vacuum.rb +++ b/app/lib/vacuum/feeds_vacuum.rb @@ -4,6 +4,7 @@ class Vacuum::FeedsVacuum def perform vacuum_inactive_home_feeds! vacuum_inactive_list_feeds! + vacuum_inactive_direct_feeds! end private @@ -20,6 +21,12 @@ class Vacuum::FeedsVacuum end end + def vacuum_inactive_direct_feeds! + inactive_users_lists.select(:id).find_in_batches do |lists| + feed_manager.clean_feeds!(:direct, lists.map(&:id)) + end + end + def inactive_users User.confirmed.inactive end |