Class: BatchKit::Sequence::Run
- Defined in:
- lib/batch-kit/framework/sequence_run.rb
Overview
Captures details of an execution of a task.
Instance Attribute Summary collapse
-
#sequence_run_id ⇒ Fixnum
An integer identifier that uniquely identifies this task run.
Attributes inherited from Runnable
#definition, #end_time, #exception, #exit_code, #instance, #lock_name, #lock_timeout, #lock_wait_timeout, #object, #start_time, #status
Instance Method Summary collapse
-
#initialize(seq_def, job_object, *run_args) ⇒ Run
constructor
Create a new sequence run.
-
#persist? ⇒ Boolean
True if this sequence run should be persisted in any persistence layer.
-
#to_s ⇒ String
A short representation of this Sequence::Run.
Methods inherited from Runnable
#abort, add_delegated_properties, #around_execute, #elapsed, #event_name, #failure, #label, #post_execute, #pre_execute, #success
Methods included from Lockable
Constructor Details
#initialize(seq_def, job_object, *run_args) ⇒ Run
Create a new sequence run.
24 25 26 27 |
# File 'lib/batch-kit/framework/sequence_run.rb', line 24 def initialize(seq_def, job_object, *run_args) raise ArgumentError, "seq_def not a Sequence::Definition" unless seq_def.is_a?(Sequence::Definition) super(seq_def, job_object, run_args) end |
Instance Attribute Details
#sequence_run_id ⇒ Fixnum
Returns An integer identifier that uniquely identifies this task run.
10 11 12 |
# File 'lib/batch-kit/framework/sequence_run.rb', line 10 def sequence_run_id @sequence_run_id end |
Instance Method Details
#persist? ⇒ Boolean
Returns True if this sequence run should be persisted in any persistence layer.
32 33 34 |
# File 'lib/batch-kit/framework/sequence_run.rb', line 32 def persist? !definition.do_not_track end |
#to_s ⇒ String
Returns A short representation of this Sequence::Run.
38 39 40 |
# File 'lib/batch-kit/framework/sequence_run.rb', line 38 def to_s "<BatchKit::Sequence::Run label='#{label}'>" end |