diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-04-05 10:09:22 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-04-05 10:21:25 +0200 |
commit | 87b16abd93ff60acd245776d5b0d914fd580c259 (patch) | |
tree | 19dcc2ef755814cf2b19be533df0fe978db46f55 /hugolib/site.go | |
parent | 415ca9673d3bd3c06ab94f3d83897c892fce5f27 (diff) |
Add HUGO_NUMWORKERMULTIPLIER
And use that to calculate number of workers, if set, else fall back to number of logical CPUs.
Also tweak the relevant related settings to match the new setup.
Also remove the setting of `runtime.GOMAXPROCS` as this has been the default behaviour since Go 1.5.
Fixes #5814
Diffstat (limited to 'hugolib/site.go')
-rw-r--r-- | hugolib/site.go | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/hugolib/site.go b/hugolib/site.go index 84ee7823c..616b5b37d 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -1881,15 +1881,6 @@ func (s *Site) newPage(kind string, sections ...string) *pageState { return p } -func getGoMaxProcs() int { - if gmp := os.Getenv("GOMAXPROCS"); gmp != "" { - if p, err := strconv.Atoi(gmp); err == nil { - return p - } - } - return 1 -} - func (s *Site) shouldBuild(p page.Page) bool { return shouldBuild(s.BuildFuture, s.BuildExpired, s.BuildDrafts, p.Draft(), p.PublishDate(), p.ExpiryDate()) |