Class: BatchesTaskProcessor::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/batches_task_processor/processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task_id = nil) ⇒ Processor

Returns a new instance of Processor.



8
9
10
# File 'lib/batches_task_processor/processor.rb', line 8

def initialize(task_id = nil)
  @task_id = task_id || ENV['RUNNER_TASK_ID']
end

Instance Attribute Details

#task_idObject (readonly)

Returns the value of attribute task_id.



6
7
8
# File 'lib/batches_task_processor/processor.rb', line 6

def task_id
  @task_id
end

Instance Method Details

#callObject



12
13
14
# File 'lib/batches_task_processor/processor.rb', line 12

def call
  init_jobs
end

#process_job(job_no) ⇒ Object



16
17
18
# File 'lib/batches_task_processor/processor.rb', line 16

def process_job(job_no)
  run_job(job_no.to_i)
end