Class: BatchProcessor::Processors::Sequential

Inherits:
BatchProcessor::ProcessorBase show all
Defined in:
lib/batch_processor/processors/sequential.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BatchProcessor::Processor::Execute

#execute

Methods included from BatchProcessor::Processor::Process

#process

Class Method Details

.disable_retries?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/batch_processor/processors/sequential.rb', line 11

def disable_retries?
  true
end

Instance Method Details

#process_collection_item(item) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/batch_processor/processors/sequential.rb', line 16

def process_collection_item(item)
  job = batch.job_class.new(item)
  job.batch_id = batch.batch_id
  job.perform_now
rescue StandardError => exception
  raise exception unless continue_after_exception
end