mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
ensure we default to 10 correctly
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
bebb2b8d0a
commit
873be9f90a
@@ -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
|
||||||
|
Reference in New Issue
Block a user