Replace Parallelize with function ParallelizeUntil and formally deprecate the Parallelize

This commit is contained in:
Guoliang Wang
2018-09-07 17:17:27 +08:00
parent 6e88271a61
commit c2622dd9d8
10 changed files with 25 additions and 15 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package utils
import (
"context"
"fmt"
"math"
"os"
@@ -1061,9 +1062,9 @@ func CreatePod(client clientset.Interface, namespace string, podCount int, podTe
}
if podCount < 30 {
workqueue.Parallelize(podCount, podCount, createPodFunc)
workqueue.ParallelizeUntil(context.TODO(), podCount, podCount, createPodFunc)
} else {
workqueue.Parallelize(30, podCount, createPodFunc)
workqueue.ParallelizeUntil(context.TODO(), 30, podCount, createPodFunc)
}
return createError
}