164
}
165
167
>
var errForRelease error
168
>
if releaseLeaseWithError {
169
// If the workflow context needs to be cleared, operation error passed to Release func (default).
170
// Otherwise, leave it nil here to avoid clearing the workflow context (but still return error to the caller).
171
errForRelease = retError
172
}
173
>
if retError != nil && currentWorkflowTask != nil && currentWorkflowTask.Type == enumsspb.WORKFLOW_TASK_TYPE_SPECULATIVE && ms.IsStickyTaskQueueSet() {
api.go
174
// If, while completing WFT, error is occurred and returned to the worker then worker will clear its cache.
175
// New WFT will also be created on sticky task queue and sent to worker.