Class: ActiveBatch::Batch

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
WithActiveJobArguments
Defined in:
app/models/active_batch/batch.rb

Instance Method Summary collapse

Methods included from WithActiveJobArguments

#arguments, #arguments=

Instance Method Details

#jobObject



16
17
18
# File 'app/models/active_batch/batch.rb', line 16

def job
  @job ||= job_class.constantize
end

#perform_after_batchObject



11
12
13
14
# File 'app/models/active_batch/batch.rb', line 11

def perform_after_batch
  job.after_batch(*arguments, work_units.map(&:work_result))
  update!(status: :closed)
end