X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fresthooks%2Fresthooks.go;h=733726fa1800cbe6d9a60840e77d9e8de0fba67d;hb=refs%2Fchanges%2F14%2F11114%2F2;hp=79e52faf29dc8c142ca98ca64a57d006dab15919;hpb=6522e76e305da05eff37bd8085db4d138b9501e8;p=ric-plt%2Fa1.git diff --git a/pkg/resthooks/resthooks.go b/pkg/resthooks/resthooks.go index 79e52fa..733726f 100644 --- a/pkg/resthooks/resthooks.go +++ b/pkg/resthooks/resthooks.go @@ -102,7 +102,11 @@ func createResthook(sdlInst iSdl, rmrSenderInst rmr.IRmrSender) *Resthook { } 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 }