X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fcontrol%2Fcontrol.go;h=3ebcbcd4789280ac83915ddd5f09519f395b94a9;hb=refs%2Fchanges%2F61%2F6661%2F1;hp=14bf034cc3aa418a919440fbdeede94a4e6415c5;hpb=ff383bb22dcf671c68c543294556fe303feb27ff;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/control.go b/pkg/control/control.go index 14bf034..3ebcbcd 100755 --- a/pkg/control/control.go +++ b/pkg/control/control.go @@ -142,25 +142,6 @@ func NewControl() *Control { // Read subscriptions from db c.ReadE2Subscriptions() c.ReadRESTSubscriptions() - - /* - xapp.Logger.Info("Reading subscriptions from db") - subIds, register, err := c.ReadAllSubscriptionsFromSdl() - if err != nil { - xapp.Logger.Error("%v", err) - } else { - c.registry.subIds = subIds - c.registry.register = register - c.HandleUncompletedSubscriptions(register) - } - - restSubscriptions, err := c.ReadAllRESTSubscriptionsFromSdl() - if err != nil { - xapp.Logger.Error("%v", err) - } else { - c.registry.restSubscriptions = restSubscriptions - } - */ return c } @@ -431,6 +412,8 @@ func (c *Control) SubscriptionHandler(params interface{}) (*models.SubscriptionR return &subResp, nil } + c.WriteRESTSubscriptionToDb(restSubId, restSubscription) + go c.processSubscriptionRequests(restSubscription, &subReqList, p.ClientEndpoint, p.Meid, &restSubId, xAppRmrEndpoint, md5sum) c.UpdateCounter(cRestSubRespToXapp)