Skip to content

Commit

Permalink
[cadence-cli] fix typo in input flag for parallelism (cadence-workflo…
Browse files Browse the repository at this point in the history
…w#5397)

* [cadence-cli] fix typo in input flag

* address comments

* Update flags.go

.

* Update flags.go

.

* update
  • Loading branch information
sankari165 authored Sep 14, 2023
1 parent 9224e5d commit c338eff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tools/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ const (
FlagSignalInputFileWithAlias = FlagSignalInputFile + ", sif"
FlagExcludeFile = "exclude_file"
FlagInputSeparator = "input_separator"
FlagParallism = "input_parallism"
FlagParallelism = "input_parallelism"
FlagParallismDeprecated = "input_parallism" // typo, replaced by FlagParallelism
FlagScanType = "scan_type"
FlagInvariantCollection = "invariant_collection"
FlagSkipCurrentOpen = "skip_current_open"
Expand Down
8 changes: 7 additions & 1 deletion tools/cli/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,13 @@ func newWorkflowCommands() []cli.Command {
Usage: "Reason for reset, required for tracking purpose",
},
cli.IntFlag{
Name: FlagParallism,
Name: FlagParallismDeprecated,
Value: 1,
Usage: "Number of goroutines to run in parallel. Each goroutine would process one line for every second.",
Hidden: true,
},
cli.IntFlag{
Name: FlagParallelism,
Value: 1,
Usage: "Number of goroutines to run in parallel. Each goroutine would process one line for every second.",
},
Expand Down
5 changes: 4 additions & 1 deletion tools/cli/workflowCommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,10 @@ func ResetInBatch(c *cli.Context) {
excludeFileName := c.String(FlagExcludeFile)
excludeQuery := c.String(FlagExcludeWorkflowIDByQuery)
separator := c.String(FlagInputSeparator)
parallel := c.Int(FlagParallism)
parallel := c.Int(FlagParallismDeprecated)
if parallel == 1 {
parallel = c.Int(FlagParallelism)
}

extraForResetType, ok := resetTypesMap[resetType]
if !ok {
Expand Down

0 comments on commit c338eff

Please sign in to comment.