diff options
author | Wolfy-J <[email protected]> | 2019-05-03 23:38:03 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-05-03 23:38:03 +0300 |
commit | 6d5b883247f0eb621ca51da791664a28c8539a52 (patch) | |
tree | 00ebb5e92799c60ac4050f634b0773969384f3ae /service/watcher/config.go | |
parent | 4e4f0bfb8be5d26772060bc77256cea7cbf68138 (diff) |
watching
Diffstat (limited to 'service/watcher/config.go')
-rw-r--r-- | service/watcher/config.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/service/watcher/config.go b/service/watcher/config.go index dcd31777..74be517a 100644 --- a/service/watcher/config.go +++ b/service/watcher/config.go @@ -1,7 +1,6 @@ package watcher import ( - "fmt" "github.com/spiral/roadrunner" "github.com/spiral/roadrunner/service" "time" @@ -27,12 +26,6 @@ func (c *Config) Hydrate(cfg service.Config) error { c.Interval = time.Second * time.Duration(c.Interval.Nanoseconds()) } - for name, cfg := range c.Services { - if err := cfg.Normalize(); err != nil { - return fmt.Errorf("invalid watcher `%s`: %s", name, err.Error()) - } - } - return nil } @@ -48,7 +41,7 @@ func (c *Config) Watchers(l listener) (watchers map[string]roadrunner.Watcher) { watchers = make(map[string]roadrunner.Watcher) for name, cfg := range c.Services { - watchers[name] = &watcher{lsn: l, interval: c.Interval, cfg: cfg} + watchers[name] = &watcher{lsn: l, tick: c.Interval, cfg: cfg} } return watchers |