2019-07-04 00:35:22 +01:00
|
|
|
# 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|
|
2021-01-16 18:39:31 +00:00
|
|
|
Redis.current.with do |conn|
|
|
|
|
conn.set("account:#{a.id}:regeneration", true)
|
|
|
|
end
|
2019-07-04 00:35:22 +01:00
|
|
|
puts(a.username)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|