diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-10-04 18:17:11 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-10-04 18:17:11 +0200 |
| commit | 73b57443261fbac9dd15885ebe1f9d9cd794980b (patch) | |
| tree | 9c8fc82438150c333bf5dc31ef3dc0b95c2fa0cc | |
| parent | 6267ed833aea3b54455cd7c14ddf13f998bd3f3b (diff) | |
Try to guess CPU count correctly.
| -rwxr-xr-x | cdist | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -30,6 +30,7 @@ import copy import inspect import getpass import shlex +import multiprocessing TEMPORARY_DIRECTORY = '/var/tmp' @@ -109,7 +110,7 @@ class Config: BoolOption('docker_no_user'), Option('docker_hub_repository'), Option('flatpak_state_dir'), - Option('parallel', 4) ] + Option('parallel', multiprocessing.cpu_count()) ] try: f = open('%s/.config/cdist' % os.path.expanduser('~'), 'r') |
