Class: ActiveRecord::ConnectionAdapters::ConnectionHandler
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::ConnectionHandler
- Defined in:
- lib/replica/connection_pool.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#remove_connection(klass) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/replica/connection_pool.rb', line 14 def remove_connection(klass) pool = @connection_pools[klass.connection_pool_name] @connection_pools.delete_if { |key, value| value == pool } pool.disconnect! if pool pool.spec.config if pool end |
#retrieve_connection_pool(klass) ⇒ Object
:nodoc:
7 8 9 10 11 12 |
# File 'lib/replica/connection_pool.rb', line 7 def retrieve_connection_pool(klass) pool = @connection_pools[klass.connection_pool_name] return pool if pool return nil if ActiveRecord::Base == klass retrieve_connection_pool klass.superclass end |