Adding database health to healthcheck.
Signed-off-by: naman.gupta <naman.gupta@samsung.com>
Change-Id: I18901dd232f35fdf81441dc415b5b714ced9fb98
}
func (rh *Resthook) GetA1Health() bool {
}
func (rh *Resthook) GetA1Health() bool {
- //TODO : Add database healthcheck
+ _, err := rh.db.GetAll("A1m_ns")
+ if err != nil {
+ a1.Logger.Error("error in connecting to the database. err: %v", err)
+ return false
+ }
a1.Logger.Debug("A1 is healthy")
return true
}
a1.Logger.Debug("A1 is healthy")
return true
}