parent
6baad71b1f
commit
63a337ee57
|
|
@ -2,8 +2,9 @@ package state
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/roboll/helmfile/pkg/helmexec"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/roboll/helmfile/pkg/helmexec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type result struct {
|
type result struct {
|
||||||
|
|
@ -12,11 +13,9 @@ type result struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (st *HelmState) scatterGather(concurrency int, items int, produceInputs func(), receiveInputsAndProduceIntermediates func(int), aggregateIntermediates func()) {
|
func (st *HelmState) scatterGather(concurrency int, items int, produceInputs func(), receiveInputsAndProduceIntermediates func(int), aggregateIntermediates func()) {
|
||||||
numReleases := len(st.Releases)
|
|
||||||
if concurrency < 1 {
|
if concurrency < 1 || concurrency > items {
|
||||||
concurrency = numReleases
|
concurrency = items
|
||||||
} else if concurrency > numReleases {
|
|
||||||
concurrency = numReleases
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, r := range st.Releases {
|
for _, r := range st.Releases {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue