Use quantity of workers equal to amount of found cpu cores (instead of hardcoded 5) if nothing set in config

This commit is contained in:
eleksir
2024-12-12 21:24:36 +03:00
parent 62bbf9d277
commit 5976d0b327

View File

@@ -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)
}