Class: Blazer::RunStatementJob

Inherits:
Object
  • Object
show all
Includes:
SuckerPunch::Job
Defined in:
lib/blazer/run_statement_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(result, data_source, statement, options) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/blazer/run_statement_job.rb', line 8

def perform(result, data_source, statement, options)
  ActiveRecord::Base.connection_pool.with_connection do
    data_source.connection_model.connection_pool.with_connection do
      result << data_source.run_main_statement(statement, options)
    end
  end
end