Class: RubyReactor::DispatchResult
- Inherits:
-
Object
- Object
- RubyReactor::DispatchResult
- Defined in:
- lib/ruby_reactor.rb
Overview
Sentinel returned when a step's work is handed off to a worker job and is
not yet resolved — produced by background, async_step, async_reactor,
and map's async element dispatch alike.
Instance Attribute Summary collapse
-
#execution_id ⇒ Object
readonly
Returns the value of attribute execution_id.
-
#intermediate_results ⇒ Object
readonly
Returns the value of attribute intermediate_results.
-
#job_id ⇒ Object
readonly
Returns the value of attribute job_id.
Instance Method Summary collapse
- #async? ⇒ Boolean
- #failure? ⇒ Boolean
-
#initialize(job_id:, intermediate_results: {}, execution_id: nil) ⇒ DispatchResult
constructor
A new instance of DispatchResult.
- #success? ⇒ Boolean
Constructor Details
#initialize(job_id:, intermediate_results: {}, execution_id: nil) ⇒ DispatchResult
Returns a new instance of DispatchResult.
345 346 347 348 349 |
# File 'lib/ruby_reactor.rb', line 345 def initialize(job_id:, intermediate_results: {}, execution_id: nil) @job_id = job_id @intermediate_results = intermediate_results @execution_id = execution_id end |
Instance Attribute Details
#execution_id ⇒ Object (readonly)
Returns the value of attribute execution_id.
343 344 345 |
# File 'lib/ruby_reactor.rb', line 343 def execution_id @execution_id end |
#intermediate_results ⇒ Object (readonly)
Returns the value of attribute intermediate_results.
343 344 345 |
# File 'lib/ruby_reactor.rb', line 343 def intermediate_results @intermediate_results end |
#job_id ⇒ Object (readonly)
Returns the value of attribute job_id.
343 344 345 |
# File 'lib/ruby_reactor.rb', line 343 def job_id @job_id end |
Instance Method Details
#async? ⇒ Boolean
351 352 353 |
# File 'lib/ruby_reactor.rb', line 351 def async? true end |
#failure? ⇒ Boolean
359 360 361 |
# File 'lib/ruby_reactor.rb', line 359 def failure? false end |
#success? ⇒ Boolean
355 356 357 |
# File 'lib/ruby_reactor.rb', line 355 def success? false end |