mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Fixup re-cache in case of SetRatingProfile api
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user