Distrubute statuses as a fan-out-on-write system, with optional precomputing
This commit is contained in:
parent
fe57f6330f
commit
6c4c84b161
9 changed files with 119 additions and 3 deletions
|
@ -2,6 +2,7 @@ class HomeController < ApplicationController
|
|||
before_action :authenticate_user!
|
||||
|
||||
def index
|
||||
@statuses = Status.where(account: ([current_user.account] + current_user.account.following)).where('reblog_of_id IS NULL OR account_id != ?', current_user.account.id).order('created_at desc')
|
||||
feed = Feed.new(:home, current_user.account)
|
||||
@statuses = feed.get(20, (params[:offset] || 0).to_i)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue