Class: BatchesTaskProcessor::Processor
- Inherits:
-
Object
- Object
- BatchesTaskProcessor::Processor
- Defined in:
- lib/batches_task_processor/processor.rb
Instance Attribute Summary collapse
-
#task_id ⇒ Object
readonly
Returns the value of attribute task_id.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(task_id = nil) ⇒ Processor
constructor
A new instance of Processor.
- #process_job(job_no) ⇒ Object
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_id ⇒ Object (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
#call ⇒ Object
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 |