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:
Joshua Mervine
2016-04-13 13:07:12 -07:00
committed by David Dollar
parent 9c1bbd7d26
commit ea0c5b42d0
+8 -2
View File
@@ -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) {