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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user