Fixup re-cache in case of SetRatingProfile api

This commit is contained in:
DanB
2014-03-13 17:01:02 +01:00
parent e09cc8527e
commit 37b21d2bb5
2 changed files with 2 additions and 2 deletions

View File

@@ -239,8 +239,9 @@ func (self *ApierV1) SetRatingProfile(attrs AttrSetRatingProfile, reply *string)
if err := self.RatingDb.SetRatingProfile(rpfl); err != nil {
return fmt.Errorf("%s:%s", utils.ERR_SERVER_ERROR, err.Error())
}
dataNotChanged := []string{}
//Automatic cache of the newly inserted rating profile
if err := self.RatingDb.CacheRating(nil, nil, []string{engine.RATING_PROFILE_PREFIX + keyId}, nil); err != nil {
if err := self.RatingDb.CacheRating(dataNotChanged, dataNotChanged, []string{engine.RATING_PROFILE_PREFIX + keyId}, dataNotChanged); err != nil {
return err
}
*reply = OK

View File

@@ -159,7 +159,6 @@ func (s *Session) SaveOperations() {
}
go func() {
for _, sr := range s.sessionRuns {
engine.Logger.Debug(fmt.Sprintf("Saving operations for session %v, runId: %s", s, sr.runId))
if len(sr.callCosts) == 0 {
break // There are no costs to save, ignore the operation
}