1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 10:52:19 +01:00

Use the process CPU count to determine how many children to create (#8268)

This commit is contained in:
J. Nick Koston
2025-02-18 11:10:33 -06:00
committed by GitHub
parent 1257640e48
commit abbd72e802
4 changed files with 40 additions and 13 deletions

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python3
import argparse
import multiprocessing
import os
import queue
import re
@@ -19,6 +18,7 @@ from helpers import (
filter_changed,
filter_grep,
get_binary,
get_usable_cpu_count,
git_ls_files,
load_idedata,
print_error_for_file,
@@ -170,7 +170,7 @@ def main():
"-j",
"--jobs",
type=int,
default=multiprocessing.cpu_count(),
default=get_usable_cpu_count(),
help="number of tidy instances to be run in parallel.",
)
parser.add_argument(