Skip to main content

Workflow Timeouts - Ruby SDK

Workflow timeouts

Each Workflow timeout controls the maximum duration of a different aspect of a Workflow Execution.

Set these values as keyword parameter options when starting a Workflow.

result = my_client.execute_workflow(
MyWorkflow, 'some-input',
id: 'my-workflow-id', task_queue: 'my-task-queue',
execution_timeout: 5 * 60
)

Workflow retries

A Retry Policy can work in cooperation with the timeouts to provide fine controls to optimize the execution experience.

Use a Retry Policy to automatically retry Workflow Executions on failure. Workflow Executions do not retry by default.

Workflow Executions do not retry by default, and Retry Policies should be used with Workflow Executions only in certain situations.

The retry_policy can be set when calling start_workflow or execute_workflow.

result = my_client.execute_workflow(
MyWorkflow, 'some-input',
id: 'my-workflow-id', task_queue: 'my-task-queue',
retry_policy: Temporalio::RetryPolicy.new(max_interval: 10)
)