Module: Smith::Workflow::SplitStepPersistence::Execution
- Defined in:
- lib/smith/workflow/split_step_persistence/execution.rb
Instance Method Summary collapse
- #execute_authorized_prepared_step!(authorization) ⇒ Object
- #execute_prepared_step! ⇒ Object
- #prepared_persisted_step? ⇒ Boolean
Instance Method Details
#execute_authorized_prepared_step!(authorization) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/smith/workflow/split_step_persistence/execution.rb', line 15 def () = () step = nil result = nil execution_thread = Thread.current execution_active = false begin activate_split_step_execution!(, execution_thread) execution_active = true step = execute_claimed_split_step_transition! result = consume_split_step_execution_result!(execution_thread) ensure finish_split_step_execution!(step, , execution_thread) if execution_active end result end |
#execute_prepared_step! ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/smith/workflow/split_step_persistence/execution.rb', line 7 def execute_prepared_step! = ExecutionAuthorization .instance_method(:authorize_prepared_step_execution!) .bind_call(self) result = Execution.instance_method(:execute_authorized_prepared_step!).bind_call(self, ) result.step_snapshot end |
#prepared_persisted_step? ⇒ Boolean
32 33 34 35 36 37 |
# File 'lib/smith/workflow/split_step_persistence/execution.rb', line 32 def prepared_persisted_step? @split_step_mutex.synchronize do expected = restart_safe_split_step? ? :dispatch_claimed : :prepared [expected, :execution_authorized].include?(@split_step_phase) end end |