From 1ffa173c456d85868468d4a4fdb8cbafd0a18f24 Mon Sep 17 00:00:00 2001 From: robcolbert Date: Wed, 3 Jul 2019 19:35:22 -0400 Subject: [PATCH] task to re-generate Home feed for every user --- lib/tasks/force_regenerate_feeds.rake | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/tasks/force_regenerate_feeds.rake diff --git a/lib/tasks/force_regenerate_feeds.rake b/lib/tasks/force_regenerate_feeds.rake new file mode 100644 index 00000000..a3b46294 --- /dev/null +++ b/lib/tasks/force_regenerate_feeds.rake @@ -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