//-----------------------------------------------------------------------------
type RESTSubscription struct {
- Created time.Time
+ Created string
xAppServiceName string
xAppRmrEndPoint string
Meid string
r.mutex.Lock()
defer r.mutex.Unlock()
newRestSubscription := RESTSubscription{}
- newRestSubscription.Created = time.Now()
+ newRestSubscription.Created = time.Now().Format("2006-01-02 15:04:05.000")
newRestSubscription.xAppServiceName = *xappServiceName
newRestSubscription.xAppRmrEndPoint = *xAppRmrEndPoint
newRestSubscription.Meid = *maid
if waitRouteClean > 0 {
// Wait here that response is delivered to xApp via RMR before route is cleaned
xapp.Logger.Debug("Pending %v in order to wait route cleanup", waitRouteClean)
+ r.mutex.Unlock()
time.Sleep(waitRouteClean)
+ r.mutex.Lock()
}
xapp.Logger.Debug("CLEAN %s", subs.String())
// Endpoint of merged subscription is being deleted
xapp.Logger.Debug("Subscription route update WriteSubscriptionToDb")
- c.WriteSubscriptionToDb(subs)
+ err := c.WriteSubscriptionToDb(subs)
+ if err != nil {
+ xapp.Logger.Error("tracker.UnTrackTransaction() failed:%s", err.Error())
+ }
c.UpdateCounter(cUnmergedSubscriptions)
}
return nil