Skip to content

Commit

Permalink
Fix url config for read connections
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasfed committed Dec 19, 2024
1 parent 5f74a5c commit 03bb6fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def seamless_database_pool_connection(config)
config[:read_pool]&.each_with_index do |read_config, i|
read_config = default_config.merge(read_config).with_indifferent_access
if (url = read_config.delete(:url))
master_config.merge!(ActiveRecord::DatabaseConfigurations::ConnectionUrlResolver.new(url).to_hash)
read_config.merge!(ActiveRecord::DatabaseConfigurations::ConnectionUrlResolver.new(url).to_hash)
end
read_config[:pool_weight] = read_config[:pool_weight].to_i
next unless read_config[:pool_weight] > 0
Expand Down

0 comments on commit 03bb6fb

Please sign in to comment.