fix cache loading from mongo

This commit is contained in:
Radu Ioan Fericean
2015-12-03 14:58:46 +02:00
parent 071f88a7f2
commit f78c487c5d
2 changed files with 4 additions and 4 deletions

View File

@@ -485,9 +485,9 @@ func startCDRS(internalCdrSChan chan *engine.CdrServer, logDb engine.LogStorage,
}
func startScheduler(internalSchedulerChan chan *scheduler.Scheduler, cacheDoneChan chan struct{}, ratingDb engine.RatingStorage, exitChan chan bool) {
// Wait for cache to load data before starting
cacheDone := <- cacheDoneChan
cacheDoneChan <- cacheDone
// Wait for cache to load data before starting
cacheDone := <-cacheDoneChan
cacheDoneChan <- cacheDone
utils.Logger.Info("Starting CGRateS Scheduler.")
sched := scheduler.NewScheduler()
go reloadSchedulerSingnalHandler(sched, ratingDb)

View File

@@ -955,7 +955,7 @@ func (ms *MongoStorage) GetLoadHistory(limit int, skipCache bool) (loadInsts []*
cache2go.RemKey(utils.LOADINST_KEY)
cache2go.Cache(utils.LOADINST_KEY, loadInsts)
}
return loadInsts, err
return loadInsts, nil
}
// Adds a single load instance to load history