Class: RubyReactor::Dsl::InterruptStepConfig

Inherits:
StepConfig
  • Object
show all
Defined in:
lib/ruby_reactor/dsl/interrupt_step_config.rb

Instance Attribute Summary collapse

Attributes inherited from StepConfig

#args_validator, #arguments, #async_dispatch, #compensate_block, #conditions, #dependencies, #guards, #impl, #name, #output_validator, #retry_config, #run_block, #undo_block

Instance Method Summary collapse

Methods inherited from StepConfig

#async_dispatch?, #has_impl?, #has_run_block?, #retryable?, #should_run?

Constructor Details

#initialize(config) ⇒ InterruptStepConfig

Returns a new instance of InterruptStepConfig.



9
10
11
12
13
14
15
16
# File 'lib/ruby_reactor/dsl/interrupt_step_config.rb', line 9

def initialize(config)
  super
  @correlation_id_block = config[:correlation_id_block]
  @timeout_config = config[:timeout_config]
  @validation_schema = config[:validation_schema]
  @max_attempts = config[:max_attempts] || 1
  @resume_mode = config[:resume_mode] || :inline
end

Instance Attribute Details

#correlation_id_blockObject (readonly)

Returns the value of attribute correlation_id_block.



6
7
8
# File 'lib/ruby_reactor/dsl/interrupt_step_config.rb', line 6

def correlation_id_block
  @correlation_id_block
end

#max_attemptsObject (readonly)

Returns the value of attribute max_attempts.



6
7
8
# File 'lib/ruby_reactor/dsl/interrupt_step_config.rb', line 6

def max_attempts
  @max_attempts
end

#resume_modeObject (readonly)

Returns the value of attribute resume_mode.



6
7
8
# File 'lib/ruby_reactor/dsl/interrupt_step_config.rb', line 6

def resume_mode
  @resume_mode
end

#strategyObject (readonly)

Returns the value of attribute strategy.



6
7
8
# File 'lib/ruby_reactor/dsl/interrupt_step_config.rb', line 6

def strategy
  @strategy
end

#timeout_configObject (readonly)

Returns the value of attribute timeout_config.



6
7
8
# File 'lib/ruby_reactor/dsl/interrupt_step_config.rb', line 6

def timeout_config
  @timeout_config
end

#validation_schemaObject (readonly)

Returns the value of attribute validation_schema.



6
7
8
# File 'lib/ruby_reactor/dsl/interrupt_step_config.rb', line 6

def validation_schema
  @validation_schema
end

Instance Method Details

#background_resume?Boolean

Returns:



22
23
24
# File 'lib/ruby_reactor/dsl/interrupt_step_config.rb', line 22

def background_resume?
  @resume_mode == :background
end

#interrupt?Boolean

Returns:



18
19
20
# File 'lib/ruby_reactor/dsl/interrupt_step_config.rb', line 18

def interrupt?
  true
end