Skip to content

Commit 357b8b7

Browse files
vladakVladimir Kotal
authored andcommitted
use CPU count for number of workers
1 parent 55dc851 commit 357b8b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/sync/sync.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
from commands import Commands, CommandsBase
4949
from readconfig import read_config
5050
from shutil import which
51+
import multiprocessing
5152

5253

5354
major_version = sys.version_info[0]
@@ -75,7 +76,7 @@ def worker(base):
7576
dirs_to_process = []
7677

7778
parser = argparse.ArgumentParser(description='Manage parallel workers.')
78-
parser.add_argument('-w', '--workers', default=4,
79+
parser.add_argument('-w', '--workers', default=multiprocessing.cpu_count(),
7980
help='Number of worker processes')
8081

8182
# There can be only one way how to supply list of projects to process.

0 commit comments

Comments
 (0)