about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/tasks/monsterfork.rake12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/tasks/monsterfork.rake b/lib/tasks/monsterfork.rake
index 465299562..6c2f5074a 100644
--- a/lib/tasks/monsterfork.rake
+++ b/lib/tasks/monsterfork.rake
@@ -37,4 +37,16 @@ namespace :monsterfork do
   task reindex_media_descs: :environment do
     index_statuses(Status.left_outer_joins(:media_attachments).where('media_attachments.description IS NOT NULL'))
   end
+
+  desc "Re-apply all users' filters to their home and list timelines."
+  task reapply_filters: :environment do
+    Account.local.find_each do |account|
+      Rails.logger.info("Re-applying filters for: #{account.username}")
+      FilterFeedsWorker.perform_async(account.id)
+      sleep 1
+      while Sidekiq::Queue.new.size > 5
+        sleep 1
+      end
+    end
+  end
 end