Browse Source

En cours de développement

master
losyme 3 months ago
parent
commit
cc12b40920
  1. 9
      workers/config.go

9
workers/config.go

@ -11,10 +11,7 @@ import (
"forge.chapril.org/losyme/errors"
)
const (
_defaultPoolSize = 10
_maxPoolSize = 20
)
const _maxPoolSize = 20
type Logger interface {
Trace(msg string, kv ...interface{})
@ -31,9 +28,7 @@ type Config struct {
}
func (c *Config) validate() error {
if c.PoolSize == 0 {
c.PoolSize = _defaultPoolSize
} else if c.PoolSize < 0 {
if c.PoolSize < 0 {
c.PoolSize = 0
} else if c.PoolSize > _maxPoolSize {
c.PoolSize = _maxPoolSize

Loading…
Cancel
Save