added rating profile history handler

This commit is contained in:
Radu Ioan Fericean
2013-08-02 18:57:46 +03:00
parent 10f46f348a
commit 8c8f003239
7 changed files with 157 additions and 50 deletions

File diff suppressed because one or more lines are too long

View File

@@ -55,6 +55,7 @@ func (ms *MapStorage) GetRatingProfile(key string) (rp *RatingProfile, err error
func (ms *MapStorage) SetRatingProfile(rp *RatingProfile) (err error) {
result, err := ms.ms.Marshal(rp)
ms.dict[RATING_PROFILE_PREFIX+rp.Id] = result
go historyScribe.Record(RATING_PROFILE_PREFIX+rp.Id, rp)
return
}
@@ -70,7 +71,7 @@ func (ms *MapStorage) GetDestination(key string) (dest *Destination, err error)
func (ms *MapStorage) SetDestination(dest *Destination) (err error) {
result, err := ms.ms.Marshal(dest)
ms.dict[DESTINATION_PREFIX+dest.Id] = result
historyScribe.Record(dest.Id, dest)
go historyScribe.Record(DESTINATION_PREFIX+dest.Id, dest)
return
}

View File

@@ -21,9 +21,8 @@ package engine
import (
"errors"
"fmt"
"menteslibres.net/gosexy/redis"
//"log"
"github.com/cgrates/cgrates/utils"
"menteslibres.net/gosexy/redis"
"strconv"
"strings"
"time"