summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-02-14 15:08:06 +0300
committerWolfy-J <[email protected]>2019-02-14 15:08:06 +0300
commit77cb14cd7d6b0773b20065e8e5a3f95d1c5c96f8 (patch)
tree15dfc710a601cdcd28149c4a7af1326178924089 /config.go
parent278e16855669a5112a9fa627a5db0fedd62266ec (diff)
default value for numWorkers
Diffstat (limited to 'config.go')
-rw-r--r--config.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.go b/config.go
index 23f1afc8..649ad9f4 100644
--- a/config.go
+++ b/config.go
@@ -2,6 +2,7 @@ package roadrunner
import (
"fmt"
+ "runtime"
"time"
)
@@ -29,6 +30,7 @@ type Config struct {
func (cfg *Config) InitDefaults() error {
cfg.AllocateTimeout = time.Minute
cfg.DestroyTimeout = time.Minute
+ cfg.NumWorkers = int64(runtime.NumCPU())
return nil
}