@@ -81,25 +81,33 @@ type (
81
81
// optional: The default task queue with the same name as the workflow task queue.
82
82
TaskQueue string
83
83
84
- // ScheduleToCloseTimeout - The end to end timeout for the activity needed.
84
+ // ScheduleToCloseTimeout - Total time that a workflow is willing to wait for Activity to complete.
85
+ // ScheduleToCloseTimeout limits the total time of an Activity's execution including retries
86
+ // (use StartToCloseTimeout to limit the time of a single attempt).
85
87
// The zero value of this uses default value.
86
- // Optional: The default value is the sum of ScheduleToStartTimeout and StartToCloseTimeout
88
+ // Either this option or StartToClose is required: Defaults to unlimited.
87
89
ScheduleToCloseTimeout time.Duration
88
90
89
- // ScheduleToStartTimeout - The maximum time an activity task can stay in a task queue before being picked up by a worker.
90
- // Note that ScheduleToStartTimeout is not retryable as retry would return it back into the same task queue.
91
- // In almost all situations that don't involve routing activities to specific hosts
92
- // it is better to rely on the default value.
93
- // Optional: defaults to unlimited
91
+ // ScheduleToStartTimeout - Time that the Activity Task can stay in the Task Queue before it is picked up by
92
+ // a Worker. Do not specify this timeout unless using host specific Task Queues for Activity Tasks are being
93
+ // used for routing. In almost all situations that don't involve routing activities to specific hosts it is
94
+ // better to rely on the default value.
95
+ // ScheduleToStartTimeout is always non-retryable. Retrying after this timeout doesn't make sense as it would
96
+ // just put the Activity Task back into the same Task Queue.
97
+ // If ScheduleToClose is not provided then this timeout is required.
98
+ // Optional: Defaults to unlimited.
94
99
ScheduleToStartTimeout time.Duration
95
100
96
- // StartToCloseTimeout - The timeout from the start of execution to end of it.
97
- // Mandatory: No default.
101
+ // StartToCloseTimeout - Maximum time of a single Activity execution attempt.
102
+ // Note that the Temporal Server doesn't detect Worker process failures directly. It relies on this timeout
103
+ // to detect that an Activity that didn't complete on time. So this timeout should be as short as the longest
104
+ // possible execution of the Activity body. Potentially long running Activities must specify HeartbeatTimeout
105
+ // and call Activity.RecordHeartbeat(ctx, "my-heartbeat") periodically for timely failure detection.
106
+ // If ScheduleToClose is not provided then this timeout is required: Defaults to the ScheduleToCloseTimeout value.
98
107
StartToCloseTimeout time.Duration
99
108
100
- // HeartbeatTimeout - The periodic timeout while the activity is in execution. This is
101
- // the max interval the server needs to hear at-least one ping from the activity.
102
- // Optional: Default zero, means no heart beating is needed.
109
+ // HeartbeatTimeout - Heartbeat interval. Activity must call Activity.RecordHeartbeat(ctx, "my-heartbeat")
110
+ // before this interval passes after the last heartbeat or the Activity starts.
103
111
HeartbeatTimeout time.Duration
104
112
105
113
// WaitForCancellation - Whether to wait for canceled activity to be completed(
0 commit comments