From 5976d0b32745f05572b61b0a1d184cc7c626d122 Mon Sep 17 00:00:00 2001 From: eleksir Date: Thu, 12 Dec 2024 21:24:36 +0300 Subject: [PATCH] Use quantity of workers equal to amount of found cpu cores (instead of hardcoded 5) if nothing set in config --- internal/lib/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/lib/util.go b/internal/lib/util.go index 026ae80..6f676a7 100644 --- a/internal/lib/util.go +++ b/internal/lib/util.go @@ -80,7 +80,7 @@ func (cnf *Config) readConfFile(path string) error { } if cnf.MaxWorkers == 0 { - cnf.MaxWorkers = 5 + cnf.MaxWorkers = runtime.NumCPU() log.Printf("max_workers set to %d", cnf.MaxWorkers) }