730
scheduler *Scheduler,
731
target *commonpb.WorkflowExecution,
733
>
request := &historyservice.RequestCancelWorkflowExecutionRequest{
734
>
NamespaceId: scheduler.NamespaceId,
735
>
CancelRequest: &workflowservice.RequestCancelWorkflowExecutionRequest{
736
>
Namespace: scheduler.Namespace,
737
>
WorkflowExecution: &commonpb.WorkflowExecution{WorkflowId: target.WorkflowId},
738
>
Reason: "cancelled by schedule overlap policy",
739
>
Identity: scheduler.identity(),
740
>
FirstExecutionRunId: target.RunId,
741
>
},
742
>
}
743
>
_, err := h.historyClient.RequestCancelWorkflowExecution(ctx, request)
744
>
return err
745
>
}
746
747
// getRateLimiterPermission returns a delay for which the caller should wait