about summary refs log tree commit diff
path: root/lib/tasks/mastodon.rake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/mastodon.rake')
-rw-r--r--lib/tasks/mastodon.rake7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake
index bceeeaf01..edfa3a4ac 100644
--- a/lib/tasks/mastodon.rake
+++ b/lib/tasks/mastodon.rake
@@ -143,6 +143,13 @@ namespace :mastodon do
     task clear_all: :environment do
       Redis.current.keys('feed:*').each { |key| Redis.current.del(key) }
     end
+
+    desc 'Generates home timelines for users who logged in in the past two weeks'
+    task build: :environment do
+      User.active.includes(:account).find_each do |u|
+        PrecomputeFeedService.new.call(u.account)
+      end
+    end
   end
 
   namespace :emails do