mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Compile the EventCost for sRun before storing it
This commit is contained in:
committed by
Dan Christian Bogos
parent
9152bb452c
commit
bba4ab873d
@@ -1551,6 +1551,9 @@ func (sS *SessionS) endSession(s *Session, tUsage, lastUsage *time.Duration,
|
||||
utils.SessionS, s.CGRID, sRunIdx, err.Error()))
|
||||
}
|
||||
}
|
||||
// compute the event cost before saving the SessionCost
|
||||
// add here to be applied for messages also
|
||||
sr.EventCost.Compute()
|
||||
if sS.cgrCfg.SessionSCfg().StoreSCosts {
|
||||
if err := sS.storeSCost(s, sRunIdx); err != nil {
|
||||
utils.Logger.Warning(
|
||||
|
||||
Reference in New Issue
Block a user