Force initial refresh
This commit is contained in:
parent
90407628e0
commit
3457be7942
6
hosts.go
6
hosts.go
|
@ -30,7 +30,11 @@ func NewHosts(hs HostsSettings, rs RedisSettings) Hosts {
|
|||
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() {
|
||||
|
|
Loading…
Reference in New Issue