mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
commands: Revert the recent changes that allowed profiling on server rebuilds
There have been indications that this may freeze the server.
This commit is contained in:
parent
9c6d377872
commit
c37bf19c89
3 changed files with 13 additions and 15 deletions
|
@ -361,32 +361,34 @@ func (c *hugoBuilder) newWatcher(pollIntervalStr string, dirList ...string) (*wa
|
|||
return watcher, nil
|
||||
}
|
||||
|
||||
func (c *hugoBuilder) build() (func(), error) {
|
||||
func (c *hugoBuilder) build() error {
|
||||
stopProfiling, err := c.initProfiling()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if stopProfiling != nil {
|
||||
stopProfiling()
|
||||
}
|
||||
}()
|
||||
|
||||
if err := c.fullBuild(false); err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
if !c.r.quiet {
|
||||
c.r.Println()
|
||||
h, err := c.hugo()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
h.PrintProcessingStats(os.Stdout)
|
||||
c.r.Println()
|
||||
}
|
||||
|
||||
return func() {
|
||||
if stopProfiling != nil {
|
||||
stopProfiling()
|
||||
}
|
||||
}, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *hugoBuilder) buildSites(noBuildLock bool) (err error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue