17344: Use #cpus as 'bundle install' concurrency.
[arvados.git] / lib / boot / passenger.go
index e0eec5ee4a047a27fba930d3f2b60346caa1e19c..5367337e81a1d0e605160c9c0dd789c9282a21f2 100644 (file)
@@ -10,6 +10,7 @@ import (
        "fmt"
        "os"
        "path/filepath"
+       "runtime"
        "strings"
        "sync"
 
@@ -96,7 +97,7 @@ func (runner installPassenger) Run(ctx context.Context, fail func(error), super
        if err != nil {
                return err
        }
-       err = super.RunProgram(ctx, appdir, runOptions{}, "bundle", "install", "--jobs", "4")
+       err = super.RunProgram(ctx, appdir, runOptions{}, "bundle", "install", "--jobs", fmt.Sprintf("%d", runtime.NumCPU()))
        if err != nil {
                return err
        }