Module: ActiveRecord::Turntable::ActiveRecordExt::ConnectionHandlerExtension
- Defined in:
- lib/active_record/turntable/active_record_ext/connection_handler_extension.rb
Instance Method Summary collapse
Instance Method Details
#owner_to_turntable_pool ⇒ Object
4 5 6 |
# File 'lib/active_record/turntable/active_record_ext/connection_handler_extension.rb', line 4 def owner_to_turntable_pool @owner_to_turntable_pool ||= Concurrent::Map.new(initial_capacity: 2) end |
#retrieve_connection_pool(spec_name) ⇒ Object
Note:
Override not to establish_connection destroy existing connection pool proxy object
9 10 11 12 13 |
# File 'lib/active_record/turntable/active_record_ext/connection_handler_extension.rb', line 9 def retrieve_connection_pool(spec_name) owner_to_turntable_pool.fetch(spec_name) do super end end |