task to re-generate Home feed for every user

This commit is contained in:
robcolbert 2019-07-03 19:35:22 -04:00
parent 5e08c29598
commit 1ffa173c45
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
task force_regenerate_feeds: 'gabsocial:force-regenerate-feeds'
namespace :gabsocial do
desc 'Re-generate home feeds for all users (run after any migrations)'
task :force_regenerate_feeds => :environment do
Account.select(:id, :username).all.each do |a|
Redis.current.set("account:#{a.id}:regeneration", true)
puts(a.username)
end
end
end