Class: RubyReactor::Executor::RetryManager

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_reactor/executor/retry_manager.rb

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ RetryManager

Returns a new instance of RetryManager.



6
7
8
# File 'lib/ruby_reactor/executor/retry_manager.rb', line 6

def initialize(context)
  @context = context
end

Instance Method Details

#execute_with_retry(step_config, reactor_class) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/ruby_reactor/executor/retry_manager.rb', line 10

def execute_with_retry(step_config, reactor_class)
  loop do
    prepare_retry_attempt(step_config)
    result = yield
    handled_result = handle_retry_result(step_config, reactor_class, result)
    return handled_result if handled_result
  end
end