diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-11-01 12:19:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-01 12:19:14 -0700 |
commit | 732a4c814e575ead4b39f00097f22b2f3b64bfc0 (patch) | |
tree | 1abed97a2cff7cc2b78c183986be959ba8f2a992 /cmd/podman/shared | |
parent | 26330aa99577b36afff9ff36a86d54978195ab2e (diff) | |
parent | 2011782d9d52958546e481f84892d00a548b9e12 (diff) | |
download | podman-732a4c814e575ead4b39f00097f22b2f3b64bfc0.tar.gz podman-732a4c814e575ead4b39f00097f22b2f3b64bfc0.tar.bz2 podman-732a4c814e575ead4b39f00097f22b2f3b64bfc0.zip |
Merge pull request #1738 from baude/pararestart
Make restart parallel and add --all
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r-- | cmd/podman/shared/parallel.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/cmd/podman/shared/parallel.go b/cmd/podman/shared/parallel.go index 03eba2f0b..dbf43a982 100644 --- a/cmd/podman/shared/parallel.go +++ b/cmd/podman/shared/parallel.go @@ -72,20 +72,22 @@ func ParallelExecuteWorkerPool(workers int, functions []ParallelWorkerInput) map func Parallelize(job string) int { numCpus := runtime.NumCPU() switch job { - case "stop": - if numCpus <= 2 { - return 4 - } else { - return numCpus * 3 - } + case "ps": + return 8 + case "restart": + return numCpus * 2 case "rm": if numCpus <= 3 { return numCpus * 3 } else { return numCpus * 4 } - case "ps": - return 8 + case "stop": + if numCpus <= 2 { + return 4 + } else { + return numCpus * 3 + } } return 3 } |