cluster/services/hercules-ci-multi-agent: limit concurrentTasks

This commit is contained in:
Max Headroom 2024-08-01 20:56:19 +02:00
parent 467bb80bbe
commit c0038700e0

View file

@ -1,4 +1,4 @@
{ cluster, depot, lib, ... }: { cluster, config, depot, lib, ... }:
let let
inherit (cluster.config.services.hercules-ci-multi-agent) nodes secrets; inherit (cluster.config.services.hercules-ci-multi-agent) nodes secrets;
@ -40,6 +40,11 @@ in
settings = { settings = {
clusterJoinTokenPath = secrets."clusterJoinToken-${org}".path; clusterJoinTokenPath = secrets."clusterJoinToken-${org}".path;
binaryCachesPath = secrets.cacheConfig.path; binaryCachesPath = secrets.cacheConfig.path;
concurrentTasks = lib.pipe config.reflection.hardware.cpu.cores [
(lib.flip builtins.div 2)
builtins.floor
(lib.max 2)
];
}; };
}); });