Skip to content

Commit

Permalink
Use sdkclient instead of frontend client
Browse files Browse the repository at this point in the history
  • Loading branch information
samanbarghi committed Apr 19, 2023
1 parent 34ece66 commit a4af667
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions workflow/workflow_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -1468,11 +1468,14 @@ func UpdateWorkflow(c *cli.Context) error {
if _, ok := updateWaitPolicyMap[waitPolicy]; !ok {
return fmt.Errorf("must specify valid wait policy: %v", strings.Join(mapKeysToArray(updateWaitPolicyMap), ", "))
}
client := client.CFactory.FrontendClient(c)
sdk, err := client.GetSDKClient(c)
if err != nil {
return err
}
ctx, cancel := common.NewContext(c)
defer cancel()

_, err = client.UpdateWorkflowExecution(ctx, &workflowservice.UpdateWorkflowExecutionRequest{
_, err = sdk.WorkflowService().UpdateWorkflowExecution(ctx, &workflowservice.UpdateWorkflowExecutionRequest{
Namespace: namespace,
WorkflowExecution: &commonpb.WorkflowExecution{
WorkflowId: wid,
Expand Down

0 comments on commit a4af667

Please sign in to comment.