Class: RubyReactor::DispatchResult

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_idObject (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_resultsObject (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_idObject (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

Returns:



351
352
353
# File 'lib/ruby_reactor.rb', line 351

def async?
  true
end

#failure?Boolean

Returns:



359
360
361
# File 'lib/ruby_reactor.rb', line 359

def failure?
  false
end

#success?Boolean

Returns:



355
356
357
# File 'lib/ruby_reactor.rb', line 355

def success?
  false
end