gearheads
/
mastodon
Archived
2
0
Fork 0

Fix replica being used even if not explicitly defined (#26074)

gh/dev
Claire 2023-07-21 11:30:53 +02:00 committed by GitHub
parent 42698b4c5c
commit 5cbc402687
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ class ApplicationRecord < ActiveRecord::Base
include Remotable 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 class << self
def update_index(_type_name, *_args, &_block) def update_index(_type_name, *_args, &_block)