Cgr-loader now clear indexing

This commit is contained in:
TeoV
2018-06-22 11:42:27 -04:00
committed by Dan Christian Bogos
parent 05d4acab5a
commit ea2b5303f2
4 changed files with 25 additions and 2 deletions

View File

@@ -398,6 +398,28 @@ func main() {
}, &reply); err != nil {
log.Printf("WARNING: Got error on cache reload: %s\n", err.Error())
}
var cacheIDs []string
if len(apfIDs) != 0 {
cacheIDs = append(cacheIDs, utils.CacheSupplierFilterIndexes, utils.CacheAttributeFilterRevIndexes)
}
if len(spfIDs) != 0 {
cacheIDs = append(cacheIDs, utils.CacheAttributeFilterIndexes, utils.CacheSupplierFilterRevIndexes)
}
if len(trspfIDs) != 0 {
cacheIDs = append(cacheIDs, utils.CacheThresholdFilterIndexes, utils.CacheThresholdFilterRevIndexes)
}
if len(stqpIDs) != 0 {
cacheIDs = append(cacheIDs, utils.CacheStatFilterIndexes, utils.CacheStatFilterRevIndexes)
}
if len(rspIDs) != 0 {
cacheIDs = append(cacheIDs, utils.CacheResourceFilterIndexes, utils.CacheResourceFilterRevIndexes)
}
if *verbose {
log.Print("Clearing cached indexes")
}
if err = cacheS.Call(utils.CacheSv1Clear, cacheIDs, &reply); err != nil {
log.Printf("WARNING: Got error on cache clear: %s\n", err.Error())
}
if len(aps) != 0 {
if *verbose {