Do 1 SetLoadID for StatQueue,Threshold,Resource instead of 2

This commit is contained in:
TeoV
2019-03-27 15:27:31 +02:00
committed by Dan Christian Bogos
parent d00cadb57e
commit 6a57a4a217
11 changed files with 84 additions and 98 deletions

View File

@@ -372,9 +372,8 @@ func (self *ApierV1) SetRatingProfile(attrs utils.AttrSetRatingProfile, reply *s
if err := self.DataManager.SetRatingProfile(rpfl, utils.NonTransactional); err != nil {
return utils.NewErrServerError(err)
}
//generate a loadID for RatingProfile and store it in database
loadIDs := map[string]string{utils.CacheRatingProfiles: utils.UUIDSha1Prefix()}
if err := self.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheRatingProfiles and store it in database
if err := self.DataManager.SetLoadIDs(map[string]string{utils.CacheRatingProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
*reply = OK
@@ -472,9 +471,8 @@ func (self *ApierV1) SetActions(attrs V1AttrSetActions, reply *string) (err erro
if err := self.DataManager.SetActions(attrs.ActionsId, storeActions, utils.NonTransactional); err != nil {
return utils.NewErrServerError(err)
}
//generate a loadID for RatingProfile and store it in database
loadIDs := map[string]string{utils.CacheActions: utils.UUIDSha1Prefix()}
if err := self.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheActions and store it in database
if err := self.DataManager.SetLoadIDs(map[string]string{utils.CacheActions: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
*reply = OK
@@ -606,9 +604,8 @@ func (self *ApierV1) SetActionPlan(attrs AttrSetActionPlan, reply *string) (err
}
sched.Reload()
}
//generate a loadID for RatingProfile and store it in database
loadIDs := map[string]string{utils.CacheActionPlans: utils.UUIDSha1Prefix()}
if err := self.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheActionPlans and store it in database
if err := self.DataManager.SetLoadIDs(map[string]string{utils.CacheActionPlans: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
*reply = OK
@@ -788,9 +785,8 @@ func (self *ApierV1) RemoveRatingProfile(attr AttrRemoveRatingProfile, reply *st
*reply = err.Error()
return utils.NewErrServerError(err)
}
//generate a loadID for RatingProfile and store it in database
loadIDs := map[string]string{utils.CacheRatingProfiles: utils.UUIDSha1Prefix()}
if err := self.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheActionPlans and store it in database
if err := self.DataManager.SetLoadIDs(map[string]string{utils.CacheRatingProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
*reply = utils.OK
@@ -879,9 +875,8 @@ func (self *ApierV1) RemoveActions(attr AttrRemoveActions, reply *string) error
return err
}
}
//generate a loadID for RatingProfile and store it in database
loadIDs := map[string]string{utils.CacheActions: utils.UUIDSha1Prefix()}
if err := self.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheActions and store it in database
if err := self.DataManager.SetLoadIDs(map[string]string{utils.CacheActions: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
*reply = utils.OK

View File

@@ -85,9 +85,8 @@ func (apierV1 *ApierV1) SetAttributeProfile(alsWrp *AttributeWrapper, reply *str
if err := apierV1.DataManager.SetAttributeProfile(alsWrp.AttributeProfile, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for attributeProfile and store it in database
loadIDs := map[string]string{utils.CacheAttributeProfiles: utils.UUIDSha1Prefix()}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheAttributeProfiles and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheAttributeProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
args := engine.ArgsGetCacheItem{
@@ -108,10 +107,11 @@ func (apierV1 *ApierV1) RemoveAttributeProfile(arg *utils.TenantIDWrapper, reply
}
if err := apierV1.DataManager.RemoveAttributeProfile(arg.Tenant, arg.ID,
utils.NonTransactional, true); err != nil {
if err.Error() != utils.ErrNotFound.Error() {
err = utils.NewErrServerError(err)
}
return err
return utils.APIErrorHandler(err)
}
//generate a loadID for CacheAttributeProfiles and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheAttributeProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
args := engine.ArgsGetCacheItem{
CacheID: utils.CacheAttributeProfiles,

View File

@@ -29,10 +29,7 @@ func (apierV1 *ApierV1) GetChargerProfile(arg utils.TenantID, reply *engine.Char
return utils.NewErrMandatoryIeMissing(missing...)
}
if cpp, err := apierV1.DataManager.GetChargerProfile(arg.Tenant, arg.ID, true, true, utils.NonTransactional); err != nil {
if err.Error() != utils.ErrNotFound.Error() {
err = utils.NewErrServerError(err)
}
return err
return utils.APIErrorHandler(err)
} else {
*reply = *cpp
}
@@ -70,9 +67,8 @@ func (apierV1 *ApierV1) SetChargerProfile(arg *ChargerWrapper, reply *string) er
if err := apierV1.DataManager.SetChargerProfile(arg.ChargerProfile, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for attributeProfile and store it in database
loadIDs := map[string]string{utils.CacheChargerProfiles: utils.UUIDSha1Prefix()}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheChargerProfiles and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheChargerProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for ChargerProfile
@@ -96,6 +92,10 @@ func (apierV1 *ApierV1) RemoveChargerProfile(arg utils.TenantIDWrapper, reply *s
arg.ID, utils.NonTransactional, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for CacheChargerProfiles and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheChargerProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for ChargerProfile
argCache := engine.ArgsGetCacheItem{
CacheID: utils.CacheChargerProfiles,

View File

@@ -34,10 +34,7 @@ func (apierV1 *ApierV1) GetDispatcherProfile(arg *utils.TenantID, reply *engine.
return utils.NewErrMandatoryIeMissing(missing...)
}
if dpp, err := apierV1.DataManager.GetDispatcherProfile(arg.Tenant, arg.ID, true, true, utils.NonTransactional); err != nil {
if err.Error() != utils.ErrNotFound.Error() {
err = utils.NewErrServerError(err)
}
return err
return utils.APIErrorHandler(err)
} else {
*reply = *dpp
}
@@ -75,9 +72,8 @@ func (apierV1 *ApierV1) SetDispatcherProfile(args *DispatcherWrapper, reply *str
if err := apierV1.DataManager.SetDispatcherProfile(args.DispatcherProfile, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for attributeProfile and store it in database
loadIDs := map[string]string{utils.CacheDispatcherProfiles: utils.UUIDSha1Prefix()}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheDispatcherProfiles and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheDispatcherProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for DispatcherProfile
@@ -101,9 +97,8 @@ func (apierV1 *ApierV1) RemoveDispatcherProfile(arg *utils.TenantIDWrapper, repl
arg.ID, utils.NonTransactional, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for attributeProfile and store it in database
loadIDs := map[string]string{utils.CacheFilters: utils.UUIDSha1Prefix()}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheDispatcherProfiles and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheDispatcherProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for DispatcherProfile
@@ -124,10 +119,7 @@ func (apierV1 *ApierV1) GetDispatcherHost(arg *utils.TenantID, reply *engine.Dis
return utils.NewErrMandatoryIeMissing(missing...)
}
if dpp, err := apierV1.DataManager.GetDispatcherHost(arg.Tenant, arg.ID, true, true, utils.NonTransactional); err != nil {
if err.Error() != utils.ErrNotFound.Error() {
err = utils.NewErrServerError(err)
}
return err
return utils.APIErrorHandler(err)
} else {
*reply = *dpp
}
@@ -165,6 +157,10 @@ func (apierV1 *ApierV1) SetDispatcherHost(args *DispatcherHostWrapper, reply *st
if err := apierV1.DataManager.SetDispatcherHost(args.DispatcherHost); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for CacheDispatcherHosts and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheDispatcherHosts: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for DispatcherProfile
argCache := engine.ArgsGetCacheItem{
CacheID: utils.CacheDispatcherHosts,
@@ -186,6 +182,10 @@ func (apierV1 *ApierV1) RemoveDispatcherHost(arg *utils.TenantIDWrapper, reply *
arg.ID, utils.NonTransactional); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for CacheDispatcherHosts and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheDispatcherHosts: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for DispatcherProfile
argCache := engine.ArgsGetCacheItem{
CacheID: utils.CacheDispatcherHosts,

View File

@@ -36,9 +36,8 @@ func (apierV1 *ApierV1) SetFilter(arg *FilterWrapper, reply *string) error {
if err := apierV1.DataManager.SetFilter(arg.Filter); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for attributeProfile and store it in database
loadIDs := map[string]string{utils.CacheFilters: utils.UUIDSha1Prefix()}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheFilters and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheFilters: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for Filter
@@ -59,10 +58,7 @@ func (apierV1 *ApierV1) GetFilter(arg utils.TenantID, reply *engine.Filter) erro
return utils.NewErrMandatoryIeMissing(missing...)
}
if fltr, err := apierV1.DataManager.GetFilter(arg.Tenant, arg.ID, true, true, utils.NonTransactional); err != nil {
if err.Error() != utils.ErrNotFound.Error() {
err = utils.NewErrServerError(err)
}
return err
return utils.APIErrorHandler(err)
} else {
*reply = *fltr
}
@@ -93,14 +89,10 @@ func (apierV1 *ApierV1) RemoveFilter(arg utils.TenantIDWrapper, reply *string) e
return utils.NewErrMandatoryIeMissing(missing...)
}
if err := apierV1.DataManager.RemoveFilter(arg.Tenant, arg.ID, utils.NonTransactional); err != nil {
if err.Error() != utils.ErrNotFound.Error() {
err = utils.NewErrServerError(err)
}
return err
return utils.APIErrorHandler(err)
}
//generate a loadID for attributeProfile and store it in database
loadIDs := map[string]string{utils.CacheFilters: utils.UUIDSha1Prefix()}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheFilters and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheFilters: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for Filter

View File

@@ -63,10 +63,7 @@ func (apierV1 *ApierV1) GetResource(arg utils.TenantID, reply *engine.Resource)
return utils.NewErrMandatoryIeMissing(missing...)
}
if res, err := apierV1.DataManager.GetResource(arg.Tenant, arg.ID, true, true, utils.NonTransactional); err != nil {
if err.Error() != utils.ErrNotFound.Error() {
err = utils.NewErrServerError(err)
}
return err
return utils.APIErrorHandler(err)
} else {
*reply = *res
}
@@ -79,10 +76,7 @@ func (apierV1 *ApierV1) GetResourceProfile(arg utils.TenantID, reply *engine.Res
return utils.NewErrMandatoryIeMissing(missing...)
}
if rcfg, err := apierV1.DataManager.GetResourceProfile(arg.Tenant, arg.ID, true, true, utils.NonTransactional); err != nil {
if err.Error() != utils.ErrNotFound.Error() {
err = utils.NewErrServerError(err)
}
return err
return utils.APIErrorHandler(err)
} else {
*reply = *rcfg
}
@@ -120,10 +114,10 @@ func (apierV1 *ApierV1) SetResourceProfile(arg *ResourceWrapper, reply *string)
if err := apierV1.DataManager.SetResourceProfile(arg.ResourceProfile, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for thresholdProfile and store it in database
//generate a loadID for CacheResourceProfiles and CacheResources and store it in database
//make 1 insert for both ResourceProfile and Resources instead of 2
loadID := utils.UUIDSha1Prefix()
loadIDs := map[string]string{utils.CacheResourceProfiles: loadID}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheResourceProfiles: loadID, utils.CacheResources: loadID}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for ResourceProfile
@@ -140,10 +134,6 @@ func (apierV1 *ApierV1) SetResourceProfile(arg *ResourceWrapper, reply *string)
Usages: make(map[string]*engine.ResourceUsage)}); err != nil {
return utils.APIErrorHandler(err)
}
loadIDs2 := map[string]string{utils.CacheResources: loadID}
if err := apierV1.DataManager.SetLoadIDs(loadIDs2); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for Resource
argCache = engine.ArgsGetCacheItem{
CacheID: utils.CacheResources,
@@ -175,6 +165,12 @@ func (apierV1 *ApierV1) RemoveResourceProfile(arg utils.TenantIDWrapper, reply *
if err := apierV1.DataManager.RemoveResource(arg.Tenant, arg.ID, utils.NonTransactional); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for CacheResourceProfiles and CacheResources and store it in database
//make 1 insert for both ResourceProfile and Resources instead of 2
loadID := utils.UUIDSha1Prefix()
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheResourceProfiles: loadID, utils.CacheResources: loadID}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for Resource
argCache = engine.ArgsGetCacheItem{
CacheID: utils.CacheResources,

View File

@@ -68,9 +68,10 @@ func (apierV1 *ApierV1) SetStatQueueProfile(arg *StatQueueWrapper, reply *string
if err := apierV1.DataManager.SetStatQueueProfile(arg.StatQueueProfile, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for CacheStatQueueProfiles and CacheStatQueues and store it in database
//make 1 insert for both StatQueueProfile and StatQueue instead of 2
loadID := utils.UUIDSha1Prefix()
loadIDs := map[string]string{utils.CacheStatQueueProfiles: loadID}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheStatQueueProfiles: loadID, utils.CacheStatQueues: loadID}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for StatQueueProfile
@@ -93,10 +94,6 @@ func (apierV1 *ApierV1) SetStatQueueProfile(arg *StatQueueWrapper, reply *string
if err := apierV1.DataManager.SetStatQueue(&engine.StatQueue{Tenant: arg.Tenant, ID: arg.ID, SQMetrics: metrics}); err != nil {
return utils.APIErrorHandler(err)
}
loadIDs2 := map[string]string{utils.CacheStatQueues: loadID}
if err := apierV1.DataManager.SetLoadIDs(loadIDs2); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for StatQueues
argCache = engine.ArgsGetCacheItem{
CacheID: utils.CacheStatQueues,
@@ -129,6 +126,12 @@ func (apierV1 *ApierV1) RemStatQueueProfile(args *utils.TenantIDWrapper, reply *
if err := apierV1.DataManager.RemoveStatQueue(args.Tenant, args.ID, utils.NonTransactional); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for CacheStatQueueProfiles and CacheStatQueues and store it in database
//make 1 insert for both StatQueueProfile and StatQueue instead of 2
loadID := utils.UUIDSha1Prefix()
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheStatQueueProfiles: loadID, utils.CacheStatQueues: loadID}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for StatQueues
argCache = engine.ArgsGetCacheItem{
CacheID: utils.CacheStatQueues,

View File

@@ -29,10 +29,7 @@ func (apierV1 *ApierV1) GetSupplierProfile(arg utils.TenantID, reply *engine.Sup
return utils.NewErrMandatoryIeMissing(missing...)
}
if spp, err := apierV1.DataManager.GetSupplierProfile(arg.Tenant, arg.ID, true, true, utils.NonTransactional); err != nil {
if err.Error() != utils.ErrNotFound.Error() {
err = utils.NewErrServerError(err)
}
return err
return utils.APIErrorHandler(err)
} else {
*reply = *spp
}
@@ -70,9 +67,8 @@ func (apierV1 *ApierV1) SetSupplierProfile(args *SupplierWrapper, reply *string)
if err := apierV1.DataManager.SetSupplierProfile(args.SupplierProfile, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for attributeProfile and store it in database
loadIDs := map[string]string{utils.CacheSupplierProfiles: utils.UUIDSha1Prefix()}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheSupplierProfiles and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheSupplierProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for SupplierProfile
@@ -95,9 +91,8 @@ func (apierV1 *ApierV1) RemoveSupplierProfile(args *utils.TenantIDWrapper, reply
if err := apierV1.DataManager.RemoveSupplierProfile(args.Tenant, args.ID, utils.NonTransactional, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for attributeProfile and store it in database
loadIDs := map[string]string{utils.CacheChargerProfiles: utils.UUIDSha1Prefix()}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheSupplierProfiles and store it in database
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheSupplierProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for SupplierProfile

View File

@@ -102,10 +102,10 @@ func (apierV1 *ApierV1) SetThresholdProfile(args *ThresholdWrapper, reply *strin
if err := apierV1.DataManager.SetThresholdProfile(args.ThresholdProfile, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for thresholdProfile and store it in database
//generate a loadID for CacheThresholdProfiles and CacheThresholds and store it in database
//make 1 insert for both ThresholdProfile and Threshold instead of 2
loadID := utils.UUIDSha1Prefix()
loadIDs := map[string]string{utils.CacheThresholdProfiles: loadID}
if err := apierV1.DataManager.SetLoadIDs(loadIDs); err != nil {
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheThresholdProfiles: loadID, utils.CacheThresholds: loadID}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for ThresholdProfile
@@ -119,10 +119,6 @@ func (apierV1 *ApierV1) SetThresholdProfile(args *ThresholdWrapper, reply *strin
if err := apierV1.DataManager.SetThreshold(&engine.Threshold{Tenant: args.Tenant, ID: args.ID}); err != nil {
return err
}
loadIDs2 := map[string]string{utils.CacheThresholds: loadID}
if err := apierV1.DataManager.SetLoadIDs(loadIDs2); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for Threshold
argCache = engine.ArgsGetCacheItem{
CacheID: utils.CacheThresholds,
@@ -154,6 +150,12 @@ func (apierV1 *ApierV1) RemoveThresholdProfile(args *utils.TenantIDWrapper, repl
if err := apierV1.DataManager.RemoveThreshold(args.Tenant, args.ID, utils.NonTransactional); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for CacheThresholdProfiles and CacheThresholds and store it in database
//make 1 insert for both ThresholdProfile and Threshold instead of 2
loadID := utils.UUIDSha1Prefix()
if err := apierV1.DataManager.SetLoadIDs(map[string]string{utils.CacheThresholdProfiles: loadID, utils.CacheThresholds: loadID}); err != nil {
return utils.APIErrorHandler(err)
}
//handle caching for Threshold
argCache = engine.ArgsGetCacheItem{
CacheID: utils.CacheThresholds,

View File

@@ -301,6 +301,10 @@ func (self *ApierV2) SetActions(attrs utils.AttrSetActions, reply *string) error
if err := self.DataManager.SetActions(attrs.ActionsId, storeActions, utils.NonTransactional); err != nil {
return utils.NewErrServerError(err)
}
//generate a loadID for CacheActions and store it in database
if err := self.DataManager.SetLoadIDs(map[string]string{utils.CacheActions: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
*reply = utils.OK
return nil
}

View File

@@ -41,9 +41,8 @@ func (apierV2 *ApierV2) SetAttributeProfile(extAlsPrfWrp *AttributeWrapper, repl
if err := apierV2.DataManager.SetAttributeProfile(alsPrf, true); err != nil {
return utils.APIErrorHandler(err)
}
//generate a loadID for attributeProfile and store it in database
loadIDs := map[string]string{utils.CacheAttributeProfiles: utils.UUIDSha1Prefix()}
if err := apierV2.DataManager.SetLoadIDs(loadIDs); err != nil {
//generate a loadID for CacheAttributeProfiles and store it in database
if err := apierV2.DataManager.SetLoadIDs(map[string]string{utils.CacheAttributeProfiles: utils.UUIDSha1Prefix()}); err != nil {
return utils.APIErrorHandler(err)
}
args := engine.ArgsGetCacheItem{