Class: RubyReactor::Executor::RetryManager
- Inherits:
-
Object
- Object
- RubyReactor::Executor::RetryManager
- Defined in:
- lib/ruby_reactor/executor/retry_manager.rb
Instance Method Summary collapse
- #execute_with_retry(step_config, reactor_class) ⇒ Object
-
#initialize(context) ⇒ RetryManager
constructor
A new instance of RetryManager.
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 |