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
16 17 18 19 20 21 |
# File 'lib/smith/workflow/split_step_persistence/execution.rb', line 16 def () () do |execution_thread| step = execute_claimed_split_step_transition! [step, consume_split_step_execution_result!(execution_thread)] end end |
#execute_prepared_step! ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/smith/workflow/split_step_persistence/execution.rb', line 7 def execute_prepared_step! result = ExecutionAuthorizationIssuance .instance_method(:with_prepared_step_execution_authorization) .bind_call(self) do || Execution.instance_method(:execute_authorized_prepared_step!).bind_call(self, ) end result.step_snapshot end |
#prepared_persisted_step? ⇒ Boolean
23 24 25 26 27 28 |
# File 'lib/smith/workflow/split_step_persistence/execution.rb', line 23 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 |