instance method get_pool_manager

Ruby on Rails 6.1.7.10

Since v6.1.7.10 Private

Available in: v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

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

owner req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close