1
0
forked from rosa/hakurei

internal/pkg: loadavg target in container environment

This exposes preferred loadavg target to the container initial process.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
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