How to set a Workflow Task Timeout in Go
Create an instance of StartWorkflowOptions
from the go.temporal.io/sdk/client
package, set the WorkflowTaskTimeout
field, and pass the instance to the ExecuteWorkflow
call.
- Type:
time.Duration
- Default:
time.Seconds * 10
workflowOptions := client.StartWorkflowOptions{
WorkflowTaskTimeout: time.Second * 10,
//...
}
workflowRun, err := c.ExecuteWorkflow(context.Background(), workflowOptions, YourWorkflowDefinition)
if err != nil {
// ...
}