mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 13:49:53 +05:00
Fixup concurrency on mediation runs and stats, improving tutorial CdrStats files
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user