ensure we default to 10 correctly - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 873be9f90aa0e23c1ec8cd99e9753742d9c4a36d
DIR parent bebb2b8d0a0a15350c492b13ce878ac5b01d488c
HTML Author: davidejones <david@davidejones.com>
Date: Mon, 6 Mar 2023 21:26:59 +0000
ensure we default to 10 correctly
Diffstat:
M deploy/deploy.go | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
DIR diff --git 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