351
ms.ClearStickyTaskQueue()
352
} else {
353
>
metrics.CompleteWorkflowTaskWithStickyEnabledCounter.With(handler.metricsHandler).Record(
api.go
354
>
1,
355
>
metrics.OperationTag(metrics.HistoryRespondWorkflowTaskCompletedScope))
356
>
if (assignedBuildId == "" || assignedBuildId == wftCompletedBuildId) &&
357
>
(ms.GetDeploymentTransition() == nil || ms.GetDeploymentTransition().GetDeployment().Equal(deployment)) {
358
>
// TODO: clean up. this is not applicable to V3
359
>
// For versioned workflows, only set sticky queue if the WFT is completed by the WF's current build ID.
360
>
// It is possible that the WF has been redirected to another build ID since this WFT started, in that case
361
>
// we should not set sticky queue of the old build ID and keep the normal queue to let Matching send the
362
>
// next WFT to the right build ID.
363
>
ms.SetStickyTaskQueue(request.StickyAttributes.WorkerTaskQueue.GetName(), request.StickyAttributes.GetScheduleToStartTimeout())
364
>
}
365
}
366