aboutsummaryrefslogtreecommitdiffhomepage
path: root/deploy
diff options
context:
space:
mode:
authordavidejones <[email protected]>2023-03-06 21:26:59 +0000
committerBjørn Erik Pedersen <[email protected]>2023-03-07 15:38:26 +0100
commit873be9f90aa0e23c1ec8cd99e9753742d9c4a36d (patch)
treecf9ebd0cf82f8f6af662979ee8c2c2975768fcc4 /deploy
parentbebb2b8d0a0a15350c492b13ce878ac5b01d488c (diff)
downloadhugo-873be9f90aa0e23c1ec8cd99e9753742d9c4a36d.tar.gz
hugo-873be9f90aa0e23c1ec8cd99e9753742d9c4a36d.zip
ensure we default to 10 correctly
Diffstat (limited to 'deploy')
-rw-r--r--deploy/deploy.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/deploy/deploy.go b/deploy/deploy.go
index edc94c404..2d3d3b552 100644
--- a/deploy/deploy.go
+++ b/deploy/deploy.go
@@ -191,6 +191,9 @@ func (d *Deployer) Deploy(ctx context.Context) error {
// Apply the changes in parallel, using an inverted worker
// pool (https://www.youtube.com/watch?v=5zXAHh5tJqQ&t=26m58s).
// sem prevents more than nParallel concurrent goroutines.
+ if d.workers <= 0 {
+ d.workers = 10
+ }
nParallel := d.workers
var errs []error
var errMu sync.Mutex // protects errs