mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 23:20:44 +01:00
Fix replica being used even if not explicitly defined (#26074)
This commit is contained in:
parent
42698b4c5c
commit
5cbc402687
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ class ApplicationRecord < ActiveRecord::Base
|
|||
|
||||
include Remotable
|
||||
|
||||
connects_to database: { writing: :primary, reading: :read }
|
||||
connects_to database: { writing: :primary, reading: ENV['DB_REPLICA_NAME'] || ENV['READ_DATABASE_URL'] ? :read : :primary }
|
||||
|
||||
class << self
|
||||
def update_index(_type_name, *_args, &_block)
|
||||
|
|
Loading…
Reference in a new issue