From: Andreas Schneider Date: Fri, 19 Jun 2020 15:35:19 +0000 (+0200) Subject: python: Fix get_max_worker_count() to always have two runners X-Git-Tag: ldb-2.2.0~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27709178e02fcd955d3f142b0e83f429aa31e33d;p=thirdparty%2Fsamba.git python: Fix get_max_worker_count() to always have two runners Thanks to Jim Brown. Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy Reviewed-by: David Mulder Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Jun 19 19:54:04 UTC 2020 on sn-devel-184 --- diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py index 5fb04ab4e2e..10339702a97 100644 --- a/python/samba/tests/docs.py +++ b/python/samba/tests/docs.py @@ -57,12 +57,12 @@ def get_max_worker_count(): cpu_count = multiprocessing.cpu_count() # Always run two processes in parallel - if cpu_count <= 2: + if cpu_count < 2: return 2 max_workers = int(cpu_count / 2) - if max_workers < 1: - return 1 + if max_workers < 2: + return 2 return max_workers