mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 08:38:45 +05:00
Add in remaing places infrastructure for ActionProfile
This commit is contained in:
committed by
Dan Christian Bogos
parent
77712ef776
commit
f19a78538a
@@ -698,6 +698,8 @@ func (ms *MongoStorage) GetKeysForPrefix(prefix string) (result []string, err er
|
||||
result, err = ms.getField3(sctx, ColIndx, utils.ActionPlanIndexes, "key")
|
||||
case utils.ActionProfilesFilterIndexPrfx:
|
||||
result, err = ms.getField3(sctx, ColIndx, utils.ActionProfilesFilterIndexPrfx, "key")
|
||||
case utils.RateProfilesFilterIndexPrfx:
|
||||
result, err = ms.getField3(sctx, ColIndx, utils.RateProfilesFilterIndexPrfx, "key")
|
||||
case utils.RateFilterIndexPrfx:
|
||||
result, err = ms.getField3(sctx, ColIndx, utils.RateFilterIndexPrfx, "key")
|
||||
case utils.FilterIndexPrfx:
|
||||
|
||||
@@ -332,6 +332,18 @@ func (self *TPExporter) Run() error {
|
||||
}
|
||||
}
|
||||
|
||||
storDataActionProfiles, err := self.storDb.GetTPActionProfiles(self.tpID, "", "")
|
||||
if err != nil && err.Error() != utils.ErrNotFound.Error() {
|
||||
utils.Logger.Warning(fmt.Sprintf("<%s> error: %s, when getting %s from stordb for export", utils.ApierS, err, utils.TpRateProfiles))
|
||||
withError = true
|
||||
}
|
||||
for _, sd := range storDataActionProfiles {
|
||||
sdModels := APItoModelTPActionProfile(sd)
|
||||
for _, sdModel := range sdModels {
|
||||
toExportMap[utils.ActionProfilesCsv] = append(toExportMap[utils.ActionProfilesCsv], sdModel)
|
||||
}
|
||||
}
|
||||
|
||||
if len(toExportMap) == 0 { // if we don't have anything to export we return not found error
|
||||
return utils.ErrNotFound
|
||||
}
|
||||
|
||||
@@ -2563,6 +2563,7 @@ func (tpr *TpReader) ReloadCache(caching string, verbose bool, opts map[string]i
|
||||
utils.ChargerProfileIDs: chargerIDs,
|
||||
utils.DispatcherProfileIDs: dppIDs,
|
||||
utils.DispatcherHostIDs: dphIDs,
|
||||
utils.RateProfileIDs: ratePrfIDs,
|
||||
utils.ActionProfileIDs: actionPrfIDs,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user