Consul debug
This commit is contained in:
parent
fc88125fe4
commit
a37f6209ff
@ -87,15 +87,15 @@ func (s *Service) Register() error {
|
||||
}
|
||||
}(s)
|
||||
|
||||
// go func(s *Service) { // TTL
|
||||
// interval := s.ttl - time.Second*2 // 2 seconds overhead
|
||||
// ticker := time.NewTicker(interval)
|
||||
// for range ticker.C {
|
||||
// if _, err := s.healthCheck(); err != nil {
|
||||
// fmt.Printf("TTL Error #: %v\n", err)
|
||||
// }
|
||||
// }
|
||||
// }(s)
|
||||
go func(s *Service) { // TTL
|
||||
interval := s.ttl - time.Second*2 // 2 seconds overhead
|
||||
ticker := time.NewTicker(interval)
|
||||
for range ticker.C {
|
||||
if _, err := s.healthCheck(); err != nil {
|
||||
fmt.Printf("TTL Error #: %v\n", err)
|
||||
}
|
||||
}
|
||||
}(s)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user