method
teardown_shared_connection_pool
v6.1.7.7 -
Show latest stable
-
0 notes -
Class: ActiveRecord::TestFixtures
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
teardown_shared_connection_pool()
private
Hide source
# File activerecord/lib/active_record/test_fixtures.rb, line 242 def teardown_shared_connection_pool if ActiveRecord::Base.legacy_connection_handling @legacy_saved_pool_configs.each_pair do |handler, names| names.each_pair do |name, shards| shards.each_pair do |shard_name, pool_config| pool_manager = handler.send(:owner_to_pool_manager)[name] pool_manager.set_pool_config(nil, shard_name, pool_config) end end end else handler = ActiveRecord::Base.connection_handler @saved_pool_configs.each_pair do |name, shards| pool_manager = handler.send(:owner_to_pool_manager)[name] shards.each_pair do |shard_name, roles| roles.each_pair do |role, pool_config| next unless pool_manager.get_pool_config(role, shard_name) pool_manager.set_pool_config(role, shard_name, pool_config) end end end end @legacy_saved_pool_configs.clear @saved_pool_configs.clear end