internal/pkg: pass impure job count
All checks were successful
Test / Create distribution (push) Successful in 1m6s
Test / Sandbox (push) Successful in 2m58s
Test / Hakurei (push) Successful in 3m56s
Test / ShareFS (push) Successful in 4m6s
Test / Sandbox (race detector) (push) Successful in 5m24s
Test / Hakurei (race detector) (push) Successful in 6m49s
Test / Flake checks (push) Successful in 1m27s
All checks were successful
Test / Create distribution (push) Successful in 1m6s
Test / Sandbox (push) Successful in 2m58s
Test / Hakurei (push) Successful in 3m56s
Test / ShareFS (push) Successful in 4m6s
Test / Sandbox (race detector) (push) Successful in 5m24s
Test / Hakurei (race detector) (push) Successful in 6m49s
Test / Flake checks (push) Successful in 1m27s
This is cleaner than checking cpu count during cure, it is impossible to avoid impurity in both situations but this is configurable. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -72,6 +72,7 @@ func main() {
|
||||
var (
|
||||
flagQuiet bool
|
||||
flagCures int
|
||||
flagJobs int
|
||||
flagBase string
|
||||
flagIdle bool
|
||||
|
||||
@@ -99,7 +100,7 @@ func main() {
|
||||
if flagHostAbstract {
|
||||
flags |= pkg.CHostAbstract
|
||||
}
|
||||
cache, err = pkg.Open(ctx, msg, flags, flagCures, base)
|
||||
cache, err = pkg.Open(ctx, msg, flags, flagCures, flagJobs, base)
|
||||
|
||||
return
|
||||
}).Flag(
|
||||
@@ -110,6 +111,10 @@ func main() {
|
||||
&flagCures,
|
||||
"cures", command.IntFlag(0),
|
||||
"Maximum number of dependencies to cure at any given time",
|
||||
).Flag(
|
||||
&flagJobs,
|
||||
"jobs", command.IntFlag(0),
|
||||
"Preferred number of jobs to run, when applicable",
|
||||
).Flag(
|
||||
&flagBase,
|
||||
"d", command.StringFlag("$MBF_CACHE_DIR"),
|
||||
|
||||
Reference in New Issue
Block a user