Skip to content

Commit

Permalink
Fix batch operations when advanced visibility is not used (#126)
Browse files Browse the repository at this point in the history
* Fixed batch operations when running with no ES

* Update batch/batch_commands.go

* Update batch/batch_commands.go

Co-authored-by: Alex Shtin <alex@shtin.com>

---------

Co-authored-by: Alex Shtin <alex@shtin.com>
  • Loading branch information
feedmeapples and alexshtin committed Mar 29, 2023
1 parent 48b50b2 commit 40f8d0b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions batch/batch_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ func startBatchJob(c *cli.Context, req *workflowservice.StartBatchOperationReque
Namespace: namespace,
Query: query,
})
if err != nil {
return fmt.Errorf("unable to count impacted workflows: %w", err)

var promptMsg string
if err == nil {
promptMsg = fmt.Sprintf("Will start a batch job operating on %v Workflow Executions. Continue? Y/N", color.Yellow(c, "%v", count.GetCount()))
} else {
promptMsg = fmt.Sprintf("Unable to count impacted workflows: %s. Will start a batch job on all Workflow Executions that match %s. Continue? Y/N", err, color.Yellow(c, "%v", query))
}

promptMsg := fmt.Sprintf(
"Will start a batch job operating on %v Workflow Executions. Continue? Y/N",
color.Yellow(c, "%v", count.GetCount()),
)
if !common.PromptYes(promptMsg, c.Bool(common.FlagYes)) {
return nil
}
Expand Down

0 comments on commit 40f8d0b

Please sign in to comment.