class ActiveRecord::ConnectionAdapters::ConnectionPool
def disconnect(raise_on_acquisition_timeout = true)
connections in the pool within a timeout interval (default duration is
- ActiveRecord::ExclusiveConnectionTimeoutError if unable to gain ownership of all
Raises:
Disconnects all connections in the pool, and clears the pool.
def disconnect(raise_on_acquisition_timeout = true) with_exclusively_acquired_all_connections(raise_on_acquisition_timeout) do synchronize do @connections.each do |conn| if conn.in_use? conn.steal! checkin conn end conn.disconnect! end @connections = [] @available.clear end end end