mirror of
https://github.com/gohugoio/hugo.git
synced 2025-02-19 20:23:00 +00:00
ensure we default to 10 correctly
This commit is contained in:
parent
bebb2b8d0a
commit
873be9f90a
1 changed files with 3 additions and 0 deletions
|
@ -191,6 +191,9 @@ func (d *Deployer) Deploy(ctx context.Context) error {
|
||||||
// Apply the changes in parallel, using an inverted worker
|
// Apply the changes in parallel, using an inverted worker
|
||||||
// pool (https://www.youtube.com/watch?v=5zXAHh5tJqQ&t=26m58s).
|
// pool (https://www.youtube.com/watch?v=5zXAHh5tJqQ&t=26m58s).
|
||||||
// sem prevents more than nParallel concurrent goroutines.
|
// sem prevents more than nParallel concurrent goroutines.
|
||||||
|
if d.workers <= 0 {
|
||||||
|
d.workers = 10
|
||||||
|
}
|
||||||
nParallel := d.workers
|
nParallel := d.workers
|
||||||
var errs []error
|
var errs []error
|
||||||
var errMu sync.Mutex // protects errs
|
var errMu sync.Mutex // protects errs
|
||||||
|
|
Loading…
Reference in a new issue