Module: AWS::Flow
- Defined in:
- lib/aws/flow/fiber.rb,
lib/aws/flow/tasks.rb,
lib/aws/flow/future.rb,
lib/aws/decider/worker.rb,
lib/aws/decider/decider.rb,
lib/aws/decider/options.rb,
lib/aws/decider/version.rb,
lib/aws/flow/flow_utils.rb,
lib/aws/flow/simple_dfa.rb,
lib/aws/decider/activity.rb,
lib/aws/decider/executor.rb,
lib/aws/flow/async_scope.rb,
lib/aws/decider/utilities.rb,
lib/aws/decider/exceptions.rb,
lib/aws/decider/task_poller.rb,
lib/aws/flow/implementation.rb,
lib/aws/decider/task_handler.rb,
lib/aws/flow/async_backtrace.rb,
lib/aws/decider/async_decider.rb,
lib/aws/decider/flow_defaults.rb,
lib/aws/decider/data_converter.rb,
lib/aws/decider/generic_client.rb,
lib/aws/decider/history_helper.rb,
lib/aws/decider/implementation.rb,
lib/aws/decider/state_machines.rb,
lib/aws/decider/workflow_clock.rb,
lib/aws/decider/workflow_client.rb,
lib/aws/decider/decision_context.rb,
lib/aws/decider/workflow_enabled.rb,
lib/aws/flow/begin_rescue_ensure.rb,
lib/aws/decider/activity_definition.rb,
lib/aws/decider/workflow_definition.rb,
lib/aws/decider/async_retrying_executor.rb,
lib/aws/decider/workflow_definition_factory.rb
Defined Under Namespace
Modules: Activities, Core, GenericTypeModule, Utilities, Workflows Classes: ActivityClient, ActivityDefaults, ActivityDefinition, ActivityExecutionContext, ActivityFailureException, ActivityMetadata, ActivityOptions, ActivityRuntimeOptions, ActivityTaskFailedException, ActivityTaskPoller, ActivityTaskTimedOutException, ActivityType, ActivityWorker, AsyncDecider, AsyncRetryingExecutor, ChildWorkflowException, ChildWorkflowFailedException, ChildWorkflowTerminatedException, ChildWorkflowTimedOutException, ContinueAsNewOptions, DecisionContext, DecisionException, DecisionID, DecisionTaskHandler, Defaults, EventsIterator, ExponentialRetryOptions, FailWorkflowExecutionException, FlowConstants, FlowException, ForkingExecutor, GenericActivityClient, GenericClient, GenericType, GenericWorker, GenericWorkflowClient, HistoryHelper, LogMock, MethodPair, MinimalDomain, MinimalWorkflowExecution, Options, RejectedExecutionException, RetryDefaults, RetryOptions, RetryPolicy, ScheduleActivityTaskFailedException, SignalExternalWorkflowException, SignalWorkflowOptions, SingleDecisionData, SingleDecisionIterator, StartChildWorkflowFailedException, StartTimerFailedException, StartWorkflowOptions, SuspendableSemaphore, WorkerDefaults, WorkerOptions, WorkflowClient, WorkflowClock, WorkflowContext, WorkflowDefaults, WorkflowDefinition, WorkflowDefinitionFactory, WorkflowException, WorkflowFactory, WorkflowFuture, WorkflowOptions, WorkflowOptionsWithDefaults, WorkflowTaskPoller, WorkflowType, WorkflowWorker, YAMLDataConverter
Class Method Summary collapse
- .decision_context ⇒ Object
- .version ⇒ Object
-
.with_retry(options = {}, &block) ⇒ Object
Execute a block with retries within a workflow context.
Instance Method Summary collapse
-
#workflow_client(service = nil, domain = nil, &block) ⇒ Object
Creates a new WorkflowClient instance.
Class Method Details
.decision_context ⇒ Object
63 64 65 |
# File 'lib/aws/decider/implementation.rb', line 63 def decision_context FlowFiber.current[:decision_context] end |
.version ⇒ Object
18 19 20 |
# File 'lib/aws/decider/version.rb', line 18 def self.version "1.0.8" end |
.with_retry(options = {}, &block) ⇒ Object
Execute a block with retries within a workflow context.
53 54 55 56 57 58 59 60 61 |
# File 'lib/aws/decider/implementation.rb', line 53 def with_retry( = {}, &block) # TODO raise a specific error instead of a runtime error raise "with_retry can only be used inside a workflow context!" if Utilities::is_external = ExponentialRetryOptions.new() retry_policy = RetryPolicy.new(.retry_function, ) = AsyncRetryingExecutor.new(retry_policy, self.decision_context.workflow_clock, .return_on_start) future = .execute(lambda { block.call }) Utilities::drill_on_future(future) unless .return_on_start end |
Instance Method Details
#workflow_client(service = nil, domain = nil, &block) ⇒ Object
Creates a new WorkflowClient instance
40 41 42 |
# File 'lib/aws/decider/implementation.rb', line 40 def workflow_client(service = nil, domain = nil, &block) AWS::Flow.send(:workflow_client, service, domain, &block) end |