Skip to content

Commit

Permalink
Use new UwS API
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Dec 9, 2024
1 parent 38937e1 commit 84de021
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions loadgen/kitchensink/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,17 @@ func (e *ClientActionsExecutor) executeUpdateAction(ctx context.Context, upd *Do

var handle client.WorkflowUpdateHandle
if upd.WithStart {
op := client.NewUpdateWithStartWorkflowOperation(opts)
var updErr error
startOpts := e.StartOptions
startOpts.WithStartOperation = op
startOpts.WorkflowIDConflictPolicy = enumspb.WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING
run, err = e.Client.ExecuteWorkflow(ctx, startOpts, e.WorkflowType, e.WorkflowInput)
startWorkflowOp := e.Client.NewWithStartWorkflowOperation(startOpts, e.WorkflowType, e.WorkflowInput)
handle, updErr = e.Client.UpdateWithStartWorkflow(ctx, client.UpdateWithStartWorkflowOptions{
StartWorkflowOperation: startWorkflowOp,
UpdateOptions: opts,
})
run, err = startWorkflowOp.Get(ctx)
if err == nil {
handle, err = op.Get(ctx)
err = updErr
}
} else {
handle, err = e.Client.UpdateWorkflow(ctx, opts)
Expand Down

0 comments on commit 84de021

Please sign in to comment.