We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86f01d6 commit de4b940Copy full SHA for de4b940
buildbot_nix/buildbot_nix/worker.py
@@ -25,11 +25,12 @@ class WorkerConfig:
25
worker_name: str = field(
26
default_factory=lambda: os.environ.get("WORKER_NAME", socket.gethostname())
27
)
28
- worker_count_str: str | None = os.environ.get("WORKER_COUNT")
29
- if worker_count_str is not None:
30
- worker_count = int(worker_count_str)
31
- else:
+ worker_count_str: str = os.environ.get("WORKER_COUNT", "0")
+ worker_count = int(worker_count_str)
+
+ if worker_count == 0:
32
worker_count = multiprocessing.cpu_count()
33
34
buildbot_dir: Path = field(
35
default_factory=lambda: Path(require_env("BUILDBOT_DIR"))
36
0 commit comments