add `monsterfork:reapply_filters` task to mass-fix users' tl filters for this update

master
multiple creatures 2019-12-03 17:24:58 -06:00
parent bc81d32c2c
commit 273a9b94de
1 changed files with 12 additions and 0 deletions

View File

@ -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