diff options
author | Valery Piashchynski <[email protected]> | 2020-10-27 16:06:39 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-10-27 16:06:39 +0300 |
commit | 27392d90f3b208adc5215ce876698650a4188463 (patch) | |
tree | db4c7e348c6b03c478a907cf89c8baaf68195d73 /worker_watcher.go | |
parent | ac5a89d63dbed7e0318c7e70ec1b0fa9c98c198a (diff) |
Fix linter warnings
Diffstat (limited to 'worker_watcher.go')
-rwxr-xr-x | worker_watcher.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/worker_watcher.go b/worker_watcher.go index f49eeacf..d289750e 100755 --- a/worker_watcher.go +++ b/worker_watcher.go @@ -2,6 +2,7 @@ package roadrunner import ( "context" + "runtime" "sync" "time" @@ -9,8 +10,6 @@ import ( "github.com/spiral/roadrunner/v2/util" ) -//var = errors.New("watcher stopped") - type Stack struct { workers []WorkerBase mutex sync.RWMutex @@ -19,7 +18,7 @@ type Stack struct { func NewWorkersStack() *Stack { return &Stack{ - workers: make([]WorkerBase, 0), + workers: make([]WorkerBase, 0, runtime.NumCPU()), } } |