mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
Replace Parallelize with function ParallelizeUntil and formally deprecate the Parallelize
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user