about summary refs log tree commit diff
path: root/app/models/feed.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-08 02:08:32 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-08 02:08:32 +0100
commitbb4d1eb2e86ec6227c18df29ce0f0f25ae2f6ee3 (patch)
treee0230cf6dc1913631aa333cc1b0724dfcc9863aa /app/models/feed.rb
parent096bfbad966e7dbd0ea2d71b12d1f411daabdb72 (diff)
Improve feed regeneration
Diffstat (limited to 'app/models/feed.rb')
-rw-r--r--app/models/feed.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/feed.rb b/app/models/feed.rb
index 211d64638..e7a39f5da 100644
--- a/app/models/feed.rb
+++ b/app/models/feed.rb
@@ -11,7 +11,8 @@ class Feed
 
     # If we're after most recent items and none are there, we need to precompute the feed
     if unhydrated.empty? && max_id == '+inf' && since_id == '-inf'
-      PrecomputeFeedService.new.call(@type, @account, limit)
+      RegenerationWorker.perform_async(@account.id, @type)
+      Status.send("as_#{@type}_timeline", @account).paginate_by_max_id(limit, nil, nil)
     else
       status_map = Status.where(id: unhydrated).with_includes.with_counters.map { |status| [status.id, status] }.to_h
       unhydrated.map { |id| status_map[id] }.compact