instance method
get_pool_manager
Ruby on Rails 6.1.7.10
Since v6.1.7.10 PrivateSignature
get_pool_manager(owner)
Returns the pool manager for an owner.
Using ‘“primary”` to look up the pool manager for ActiveRecord::Base is deprecated in favor of looking it up by `“ActiveRecord::Base”`.
During the deprecation period, if ‘“primary”` is passed, the pool manager for ActiveRecord::Base will still be returned.
Parameters
-
ownerreq
Source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 1176
def get_pool_manager(owner)
return owner_to_pool_manager[owner] if owner_to_pool_manager.key?(owner)
if owner == "primary"
ActiveSupport::Deprecation.warn("Using `\"primary\"` as a `connection_specification_name` is deprecated and will be removed in Rails 7.0.0. Please use `ActiveRecord::Base`.")
owner_to_pool_manager[Base.name]
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb line 1176
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::ConnectionHandler