Tests for re-rating

This commit is contained in:
DanB
2015-11-21 12:09:31 +01:00
parent 0c37d5327a
commit 33b3cbbcd1
4 changed files with 150 additions and 4 deletions

View File

@@ -143,6 +143,9 @@ func (self *CdrServer) RateCdrs(cgrIds, runIds, tors, cdrHosts, cdrSources, reqT
return err
}
for _, cdr := range cdrs {
if cdr.MediationRunId == "" { // raw CDRs which were not calculated before
cdr.MediationRunId = utils.META_DEFAULT
}
if err := self.rateStoreStatsReplicate(cdr); err != nil {
utils.Logger.Err(fmt.Sprintf("<CDRS> Processing CDR %+v, got error: %s", cdr, err.Error()))
}