CDRS not processing CDR further if it cannot store it (eg on duplicates), fixes #243

This commit is contained in:
DanB
2015-10-18 19:48:50 +02:00
parent 77316a16e4
commit 4ee1200c64
2 changed files with 2 additions and 0 deletions

View File

@@ -189,6 +189,7 @@ func (self *CdrServer) processCdr(storedCdr *StoredCdr) (err error) {
if self.cgrCfg.CDRSStoreCdrs { // Store RawCDRs, this we do sync so we can reply with the status
if err := self.cdrDb.SetCdr(storedCdr); err != nil { // Only original CDR stored in primary table, no derived
utils.Logger.Err(fmt.Sprintf("<CDRS> Storing primary CDR %+v, got error: %s", storedCdr, err.Error()))
return err // Error is propagated back and we don't continue processing the CDR if we cannot store it
}
}
go self.deriveRateStoreStatsReplicate(storedCdr)

View File

@@ -52,6 +52,7 @@ func TestNewSureTaxRequest(t *testing.T) {
ResponseType: "D4",
ItemList: []*STRequestItem{
&STRequestItem{
CustomerNumber: "1001",
OrigNumber: "1001",
TermNumber: "1002",
BillToNumber: "",