mirror of
https://github.com/wahyd4/forego.git
synced 2026-08-09 05:07:05 +10:00
start concurrency only runs listed processes (#64)
* start concurrency only runs listed processes * fixing all condition in a hacky way
This commit is contained in:
committed by
David Dollar
parent
9c1bbd7d26
commit
ea0c5b42d0
@@ -232,16 +232,22 @@ func runStart(cmd *Command, args []string) {
|
||||
|
||||
defaultConcurrency := 1
|
||||
|
||||
var all bool
|
||||
for name, num := range concurrency {
|
||||
if name == "all" {
|
||||
defaultConcurrency = num
|
||||
all = true
|
||||
}
|
||||
}
|
||||
|
||||
for idx, proc := range pf.Entries {
|
||||
numProcs := defaultConcurrency
|
||||
if value, ok := concurrency[proc.Name]; ok {
|
||||
numProcs = value
|
||||
if len(concurrency) > 0 {
|
||||
if value, ok := concurrency[proc.Name]; ok {
|
||||
numProcs = value
|
||||
} else if !all {
|
||||
continue
|
||||
}
|
||||
}
|
||||
for i := 0; i < numProcs; i++ {
|
||||
if (singleton == "") || (singleton == proc.Name) {
|
||||
|
||||
Reference in New Issue
Block a user