Force initial refresh

This commit is contained in:
Tyler 2018-08-05 00:22:37 -04:00
parent 90407628e0
commit 3457be7942
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ func NewHosts(hs HostsSettings, rs RedisSettings) Hosts {
providers = append(providers, NewRedisProvider(rc, hs.RedisKey)) providers = append(providers, NewRedisProvider(rc, hs.RedisKey))
} }
return Hosts{providers, time.Second * time.Duration(hs.RefreshInterval)} h := Hosts{providers, time.Second * time.Duration(hs.RefreshInterval)}
h.refresh()
return h
} }
func (h *Hosts) refresh() { func (h *Hosts) refresh() {