Merge "Fix consider-using-min-builtin warnings"

This commit is contained in:
Zuul 2024-04-19 00:54:56 +00:00 committed by Gerrit Code Review
commit 49a25e7c04
1 changed files with 1 additions and 2 deletions

View File

@ -158,8 +158,7 @@ def _get_worker_count():
# a steady-state bloat of around 2GB.
mem = psutil.virtual_memory()
mem_workers = int(mem.total / (2 * 1024 * 1024 * 1024))
if mem_workers < num_workers:
num_workers = mem_workers
num_workers = min(num_workers, mem_workers)
# And just in case, always at least one.
if num_workers <= 0: