diff --git a/batch/batch_commands.go b/batch/batch_commands.go index 495fb70c..f77a24d4 100644 --- a/batch/batch_commands.go +++ b/batch/batch_commands.go @@ -83,10 +83,8 @@ func ListBatchJobs(c *cli.Context) error { // BatchTerminate terminate a list of workflows func BatchTerminate(c *cli.Context) error { operator := common.GetCurrentUserFromEnv() - rps := float32(c.Float64(common.FlagRPS)) req := workflowservice.StartBatchOperationRequest{ - MaxOperationsPerSecond: rps, Operation: &workflowservice.StartBatchOperationRequest_TerminationOperation{ TerminationOperation: &batch.BatchOperationTermination{ Identity: operator, @@ -100,10 +98,8 @@ func BatchTerminate(c *cli.Context) error { // BatchCancel cancel a list of workflows func BatchCancel(c *cli.Context) error { operator := common.GetCurrentUserFromEnv() - rps := float32(c.Float64(common.FlagRPS)) req := workflowservice.StartBatchOperationRequest{ - MaxOperationsPerSecond: rps, Operation: &workflowservice.StartBatchOperationRequest_CancellationOperation{ CancellationOperation: &batch.BatchOperationCancellation{ Identity: operator, @@ -118,14 +114,12 @@ func BatchCancel(c *cli.Context) error { func BatchSignal(c *cli.Context) error { signalName := c.String(common.FlagName) operator := common.GetCurrentUserFromEnv() - rps := float32(c.Float64(common.FlagRPS)) input, err := common.ProcessJSONInput(c) if err != nil { return err } req := workflowservice.StartBatchOperationRequest{ - MaxOperationsPerSecond: rps, Operation: &workflowservice.StartBatchOperationRequest_SignalOperation{ SignalOperation: &batch.BatchOperationSignal{ Signal: signalName, @@ -141,10 +135,8 @@ func BatchSignal(c *cli.Context) error { // BatchDelete delete a list of workflows func BatchDelete(c *cli.Context) error { operator := common.GetCurrentUserFromEnv() - rps := float32(c.Float64(common.FlagRPS)) req := workflowservice.StartBatchOperationRequest{ - MaxOperationsPerSecond: rps, Operation: &workflowservice.StartBatchOperationRequest_DeletionOperation{ DeletionOperation: &batch.BatchOperationDeletion{ Identity: operator, diff --git a/common/defs-flags.go b/common/defs-flags.go index a2fd232b..92334a81 100644 --- a/common/defs-flags.go +++ b/common/defs-flags.go @@ -63,13 +63,12 @@ const ( FlagUpdateIDDefinition = "UpdateID to check the result of an update (either UpdateID or Update handler name should be passed)" FlagCancelWorkflow = "Cancel Workflow Execution with given Workflow Id." FlagWorkflowIDTerminate = "Terminate Workflow Execution with given Workflow Id." - FlagRPSDefinition = "Limit for batch operation's requests per second." FlagQueryCancel = "Cancel Workflow Executions with given List Filter." FlagQueryDelete = "Delete Workflow Executions with given List Filter." - FlagQuerySignal = "Signal Workflow Executions with given List Filter." - FlagQueryReset = "Reset Workflow Executions with given List Filter" + FlagQuerySignal = "Signal Workflow Executions with given List List Filter." FlagQueryTerminate = "Terminate Workflow Executions with given List Filter." FlagEventIDDefinition = "The Event Id for any Event after WorkflowTaskStarted you want to reset to (exclusive). It can be WorkflowTaskCompleted, WorkflowTaskFailed or others." + FlagQueryResetBatch = "Visibility Query of Search Attributes describing the Workflow Executions to reset. See https://docs.temporal.io/docs/tctl/workflow/list#--query." FlagInputFileReset = "Input file that specifies Workflow Executions to reset. Each line contains one Workflow Id as the base Run and, optionally, a Run Id." FlagExcludeFileDefinition = "Input file that specifies Workflow Executions to exclude from a reset." FlagInputSeparatorDefinition = "Separator for the input file. The default is a tab (`\t`)." diff --git a/workflow/workflow.go b/workflow/workflow.go index 1ebee70a..8f023e05 100644 --- a/workflow/workflow.go +++ b/workflow/workflow.go @@ -144,11 +144,6 @@ func NewWorkflowCommands() []*cli.Command { Usage: common.FlagQuerySignal, Category: common.CategoryMain, }, - &cli.Float64Flag{ - Name: common.FlagRPS, - Usage: common.FlagRPSDefinition, - Category: common.CategoryMain, - }, &cli.StringFlag{ Name: common.FlagName, Usage: common.FlagSignalName, @@ -232,11 +227,6 @@ func NewWorkflowCommands() []*cli.Command { Usage: common.FlagQueryCancel, Category: common.CategoryMain, }, - &cli.Float64Flag{ - Name: common.FlagRPS, - Usage: common.FlagRPSDefinition, - Category: common.CategoryMain, - }, &cli.StringFlag{ Name: common.FlagReason, Usage: common.FlagReasonDefinition, @@ -276,11 +266,6 @@ func NewWorkflowCommands() []*cli.Command { Usage: common.FlagQueryTerminate, Category: common.CategoryMain, }, - &cli.Float64Flag{ - Name: common.FlagRPS, - Usage: common.FlagRPSDefinition, - Category: common.CategoryMain, - }, &cli.StringFlag{ Name: common.FlagReason, Usage: common.FlagReasonDefinition, @@ -320,11 +305,6 @@ func NewWorkflowCommands() []*cli.Command { Usage: common.FlagQueryDelete, Category: common.CategoryMain, }, - &cli.Float64Flag{ - Name: common.FlagRPS, - Usage: common.FlagRPSDefinition, - Category: common.CategoryMain, - }, &cli.StringFlag{ Name: common.FlagReason, Usage: common.FlagReasonDefinition, @@ -381,10 +361,9 @@ func NewWorkflowCommands() []*cli.Command { &cli.StringFlag{ Name: common.FlagQuery, Aliases: common.FlagQueryAlias, - Usage: common.FlagQueryReset, + Usage: common.FlagQueryResetBatch, Category: common.CategoryMain, - }, - &cli.StringFlag{ + }, &cli.StringFlag{ Name: common.FlagInputFile, Usage: common.FlagInputFileReset, Category: common.CategoryMain,