mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 02:26:26 +05:00
Merge branch 'master' of https://github.com/cgrates/cgrates
This commit is contained in:
@@ -328,7 +328,7 @@ func TestLoaderITWriteToDatabase(t *testing.T) {
|
||||
for _, st := range mpIDs {
|
||||
rcv, err := loader.dataStorage.GetStatQueueProfile(st.Tenant, st.ID, true, utils.NonTransactional)
|
||||
if err != nil {
|
||||
t.Error("Failed GetStatsQueue: ", err.Error())
|
||||
t.Errorf("Failed GetStatsQueue, tenant: %s, id: %s, error: %s ", st.Tenant, st.ID, err.Error())
|
||||
}
|
||||
sts, err := APItoStats(st, "UTC")
|
||||
if err != nil {
|
||||
|
||||
@@ -1510,14 +1510,14 @@ func (ms *MapStorage) GetStatQueueProfile(tenant string, id string,
|
||||
}
|
||||
|
||||
// SetStatsQueue stores a StatsQueue into DataDB
|
||||
func (ms *MapStorage) SetStatQueueProfile(scf *StatQueueProfile) (err error) {
|
||||
func (ms *MapStorage) SetStatQueueProfile(sqp *StatQueueProfile) (err error) {
|
||||
ms.mu.Lock()
|
||||
defer ms.mu.Unlock()
|
||||
result, err := ms.ms.Marshal(scf)
|
||||
result, err := ms.ms.Marshal(sqp)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ms.dict[utils.StatQueueProfilePrefix+scf.ID] = result
|
||||
ms.dict[utils.StatQueueProfilePrefix+utils.ConcatenatedKey(sqp.Tenant, sqp.ID)] = result
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -1626,7 +1626,7 @@ func (rs *RedisStorage) SetStatQueueProfile(sq *StatQueueProfile) (err error) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return rs.Cmd("SET", utils.StatQueueProfilePrefix+sq.ID, result).Err
|
||||
return rs.Cmd("SET", utils.StatQueueProfilePrefix+utils.ConcatenatedKey(sq.Tenant, sq.ID), result).Err
|
||||
}
|
||||
|
||||
// RemStatsQueue removes a StatsQueue from dataDB
|
||||
|
||||
Reference in New Issue
Block a user