pad worker numbering
This commit is contained in:
parent
0b145d91d8
commit
2a565a8d5a
|
@ -734,7 +734,7 @@ class NixConfigurator(ConfiguratorBase):
|
||||||
for item in worker_config:
|
for item in worker_config:
|
||||||
cores = item.get("cores", 0)
|
cores = item.get("cores", 0)
|
||||||
for i in range(cores):
|
for i in range(cores):
|
||||||
worker_name = f"{item['name']}-{i}"
|
worker_name = f"{item['name']}-{i:03}"
|
||||||
config["workers"].append(worker.Worker(worker_name, item["pass"]))
|
config["workers"].append(worker.Worker(worker_name, item["pass"]))
|
||||||
worker_names.append(worker_name)
|
worker_names.append(worker_name)
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,11 @@ class WorkerConfig:
|
||||||
def setup_worker(
|
def setup_worker(
|
||||||
application: service.Application, id: int, config: WorkerConfig
|
application: service.Application, id: int, config: WorkerConfig
|
||||||
) -> None:
|
) -> None:
|
||||||
basedir = f"{config.buildbot_dir}-{id}"
|
basedir = f"{config.buildbot_dir}-{id:03}"
|
||||||
os.makedirs(basedir, mode=0o700, exist_ok=True)
|
os.makedirs(basedir, mode=0o700, exist_ok=True)
|
||||||
|
|
||||||
hostname = socket.gethostname()
|
hostname = socket.gethostname()
|
||||||
workername = f"{hostname}-{id}"
|
workername = f"{hostname}-{id:03}"
|
||||||
keepalive = 600
|
keepalive = 600
|
||||||
umask = None
|
umask = None
|
||||||
maxdelay = 300
|
maxdelay = 300
|
||||||
|
|
Loading…
Reference in a new issue