Update TPReader to Recache both ActionPlans and AccountActionPlans

This commit is contained in:
TeoV
2020-04-30 18:38:47 +03:00
committed by Dan Christian Bogos
parent 1083c0315f
commit 7f28a6020a

View File

@@ -832,9 +832,17 @@ func (tpr *TpReader) LoadAccountActionsFiltered(qriedAA *utils.TPAccountActions)
if err = tpr.dm.SetAccountActionPlans(id, []string{accountAction.ActionPlanId}, false); err != nil {
return err
}
if err = tpr.dm.CacheDataFromDB(utils.AccountActionPlansPrefix, []string{id}, true); err != nil {
var reply string
if err := connMgr.Call(tpr.cacheConns, nil,
utils.CacheSv1ReloadCache, utils.AttrReloadCacheWithArgDispatcher{
AttrReloadCache: utils.AttrReloadCache{
ArgsCache: utils.ArgsCache{AccountActionPlanIDs: []string{id},
ActionPlanIDs: []string{accountAction.ActionPlanId}},
},
}, &reply); err != nil {
return err
}
}
// action triggers
var actionTriggers ActionTriggers