internal/pkg: loadavg target in container environment
Test / Create distribution (push) Successful in 56s
Test / Sandbox (push) Successful in 3m2s
Test / ShareFS (push) Successful in 3m58s
Test / Hakurei (push) Successful in 4m5s
Test / Sandbox (race detector) (push) Successful in 5m29s
Test / Hakurei (race detector) (push) Successful in 6m40s
Test / Flake checks (push) Successful in 1m4s

This exposes preferred loadavg target to the container initial process.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
cat
2026-07-09 09:45:43 +09:00
parent 2f1534853a
commit 6cfd8fb934
3 changed files with 46 additions and 18 deletions
+9 -1
View File
@@ -38,7 +38,15 @@ func main() {
}
environ := slices.DeleteFunc(slices.Clone(os.Environ()), func(s string) bool {
return s == "CURE_JOBS="+strconv.Itoa(runtime.NumCPU())
for _, t := range []string{
"CURE_JOBS=" + strconv.Itoa(runtime.NumCPU()),
"CURE_LOAD=" + strconv.Itoa(runtime.NumCPU()+2),
} {
if s == t {
return true
}
}
return false
})
var hostNet, layers, promote bool