mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Cgr-loader now clear indexing
This commit is contained in:
committed by
Dan Christian Bogos
parent
05d4acab5a
commit
ea2b5303f2
@@ -59,7 +59,7 @@ func (chSv1 *CacheSv1) RemoveItem(args *engine.ArgsGetCacheItem,
|
||||
return chSv1.cacheS.V1RemoveItem(args, reply)
|
||||
}
|
||||
|
||||
// Clear will clear partitions in the cache (all for nil, none for empty slice)
|
||||
// Clear will clear partitions in the cache (nil fol all, empty slice for none)
|
||||
func (chSv1 *CacheSv1) Clear(cacheIDs []string,
|
||||
reply *string) error {
|
||||
return chSv1.cacheS.V1Clear(cacheIDs, reply)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -2162,6 +2162,7 @@ func (tpr *TpReader) WriteToDatabase(flush, verbose, disable_reverse bool) (err
|
||||
log.Print("AttributeProfiles:")
|
||||
}
|
||||
for _, tpTH := range tpr.attributeProfiles {
|
||||
|
||||
th, err := APItoAttributeProfile(tpTH, tpr.timezone)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -2044,7 +2044,7 @@ func (smg *SMGeneric) syncSessions() {
|
||||
if err := conn.Call(utils.SessionSv1GetActiveSessionIDs,
|
||||
"", &queriedSessionIDs); err != nil {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("error quering session ids : %+v", err))
|
||||
fmt.Sprintf("<%s> error quering session ids : %+v", utils.SessionS, err))
|
||||
continue
|
||||
}
|
||||
for _, sessionID := range queriedSessionIDs {
|
||||
|
||||
Reference in New Issue
Block a user