mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-15 00:49:51 +00:00
feat: set the default max workers to the number of available CPU cores
This commit is contained in:
parent
12c208cad4
commit
5cb0463cf6
@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
@ -14,7 +15,7 @@ import (
|
||||
sliceutil "github.com/usual2970/certimate/internal/pkg/utils/slice"
|
||||
)
|
||||
|
||||
var maxWorkers = 16
|
||||
var maxWorkers = runtime.NumCPU()
|
||||
|
||||
func init() {
|
||||
envMaxWorkers := os.Getenv("CERTIMATE_WORKFLOW_MAX_WORKERS")
|
||||
|
Loading…
x
Reference in New Issue
Block a user