cache action plans

fixes #279, fixes #281
This commit is contained in:
Radu Ioan Fericean
2015-11-08 16:26:57 +02:00
parent 204acb886c
commit 5ebfa319fc
9 changed files with 160 additions and 64 deletions

View File

@@ -652,7 +652,7 @@ func (tpr *TpReader) LoadAccountActionsFiltered(qriedAA *TpAccountAction) error
if accountAction.ActionPlanId != "" {
// get old userBalanceIds
var exitingAccountIds []string
existingActionPlans, err := tpr.ratingStorage.GetActionPlans(accountAction.ActionPlanId)
existingActionPlans, err := tpr.ratingStorage.GetActionPlans(accountAction.ActionPlanId, true)
if err == nil && len(existingActionPlans) > 0 {
// all action timings from a specific tag shuld have the same list of user balances from the first one
exitingAccountIds = existingActionPlans[0].AccountIds