mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 18:46:24 +05:00
Added Resource,Threshold and Stats ids to TPReader cache reload
This commit is contained in:
committed by
Dan Christian Bogos
parent
7c109c5fd1
commit
4d90083da2
@@ -839,6 +839,24 @@ func (tpr *TpReader) ShowStatistics() {
|
||||
// GetLoadedIds returns the identities loaded for a specific category, useful for cache reloads
|
||||
func (tpr *TpReader) GetLoadedIds(categ string) ([]string, error) {
|
||||
switch categ {
|
||||
case utils.ResourcesPrefix:
|
||||
keys := make([]string, len(tpr.resources))
|
||||
for i, k := range tpr.resources {
|
||||
keys[i] = k.TenantID()
|
||||
}
|
||||
return keys, nil
|
||||
case utils.StatQueuePrefix:
|
||||
keys := make([]string, len(tpr.statQueues))
|
||||
for i, k := range tpr.statQueues {
|
||||
keys[i] = k.TenantID()
|
||||
}
|
||||
return keys, nil
|
||||
case utils.ThresholdPrefix:
|
||||
keys := make([]string, len(tpr.thresholds))
|
||||
for i, k := range tpr.thresholds {
|
||||
keys[i] = k.TenantID()
|
||||
}
|
||||
return keys, nil
|
||||
case utils.DestinationPrefix:
|
||||
keys := make([]string, len(tpr.destinations))
|
||||
i := 0
|
||||
|
||||
Reference in New Issue
Block a user