Change notifications API to use a replica (#25874)
This commit is contained in:
parent
82e477b184
commit
fdc3ff7c2d
8 changed files with 31 additions and 11 deletions
|
@ -6,7 +6,7 @@ class Api::V1::Timelines::HomeController < Api::BaseController
|
|||
after_action :insert_pagination_headers, unless: -> { @statuses.empty? }
|
||||
|
||||
def show
|
||||
ApplicationRecord.connected_to(role: :read, prevent_writes: true) do
|
||||
with_read_replica do
|
||||
@statuses = load_statuses
|
||||
@relationships = StatusRelationshipsPresenter.new(@statuses, current_user&.account_id)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue