Consul debug
This commit is contained in:
parent
0aa79c7d35
commit
fc88125fe4
@ -119,7 +119,7 @@ func (s *Service) healthCheck() (bool, error) {
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
req.Header.Set("User-Agent", "Health Check")
|
||||
req.Header.Set("User-Agent", "service/internal")
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
@ -132,6 +132,7 @@ func (s *Service) healthCheck() (bool, error) {
|
||||
|
||||
if alive {
|
||||
if err := s.agent.PassTTL("service:"+s.GetID(), "OK"); err != nil {
|
||||
fmt.Printf("Failed to pass TTL: %v", err)
|
||||
return false, err
|
||||
}
|
||||
return true, nil
|
||||
|
Loading…
Reference in New Issue
Block a user