Fixup concurrency on mediation runs and stats, improving tutorial CdrStats files

This commit is contained in:
DanB
2014-08-03 16:04:43 +02:00
parent 455379ef97
commit 90fa1465ac
7 changed files with 45 additions and 26 deletions

View File

@@ -189,6 +189,7 @@ func startSessionManager(responder *engine.Responder, loggerDb engine.LogStorage
sm, _ = sessionmanager.NewOSipsSessionManager(cfg, raterConn, cdrsConn)
default:
engine.Logger.Err(fmt.Sprintf("<SessionManager> Unsupported session manger type: %s!", cfg.SMSwitchType))
exitChan <- true
}
if err = sm.Connect(); err != nil {
engine.Logger.Err(fmt.Sprintf("<SessionManager> error: %s!", err))

View File

@@ -232,6 +232,9 @@ func main() {
}
if cdrstats != nil {
statsQueueIds, _ := loader.GetLoadedIds(engine.CDR_STATS_PREFIX)
if *flush {
statsQueueIds = []string{} // Force reload all
}
if len(statsQueueIds) != 0 {
if *verbose {
log.Print("Reloading CDRStats data")