ApierV2.LoadTariffPlanFromFolder with support for returning loadInstance data, various localtest cache tests fixes

This commit is contained in:
DanB
2015-08-23 15:48:14 +02:00
parent 9d88fdc792
commit f2386c88f3
4 changed files with 156 additions and 15 deletions

View File

@@ -1328,12 +1328,12 @@ func (tpr *TpReader) WriteToDatabase(flush, verbose bool) (err error) {
log.Print("\t", al.GetId())
}
}
ldInst := tpr.GetLoadInstance()
if verbose {
ldInst := tpr.GetLoadInstance()
log.Printf("LoadHistory, instance: %+v\n", ldInst)
if err = tpr.accountingStorage.AddLoadHistory(ldInst, tpr.loadHistSize); err != nil {
return err
}
}
if err = tpr.accountingStorage.AddLoadHistory(ldInst, tpr.loadHistSize); err != nil {
return err
}
return
}