Module: ActiveRecord::ConnectionAdapters::ConnectionPool::ExecutorHooks

Defined in:
lib/active_record/connection_adapters/abstract/connection_pool.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.complete(_) ⇒ Object



217
218
219
220
221
222
223
224
225
226
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 217

def complete(_)
  ActiveRecord::Base.connection_handler.each_connection_pool do |pool|
    if (connection = pool.active_connection?)
      transaction = connection.current_transaction
      if transaction.closed? || !transaction.joinable?
        pool.release_connection
      end
    end
  end
end

.runObject



213
214
215
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 213

def run
  # noop
end