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



192
193
194
195
196
197
198
199
200
201
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 192

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



188
189
190
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 188

def run
  # noop
end