mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated config_default
This commit is contained in:
@@ -165,7 +165,7 @@ const CGRATES_CFG_JSON = `
|
||||
"*timings": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // timings caching
|
||||
"*resource_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control resource profiles caching
|
||||
"*resources": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control resources caching
|
||||
"*event_resources": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // matching resources to events
|
||||
"*event_resources": {"limit": -1, "ttl": "", "static_ttl": false}, // matching resources to events
|
||||
"*statqueue_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // statqueue profiles
|
||||
"*statqueues": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // statqueues with metrics
|
||||
"*threshold_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control threshold profiles caching
|
||||
@@ -183,13 +183,13 @@ const CGRATES_CFG_JSON = `
|
||||
"*attribute_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false}, // control attribute filter indexes caching
|
||||
"*charger_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false}, // control charger filter indexes caching
|
||||
"*dispatcher_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false}, // control dispatcher filter indexes caching
|
||||
"*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control dispatcher routes caching
|
||||
"*diameter_messages": {"limit": -1, "ttl": "3h", "static_ttl": false, "precache": false}, // diameter messages caching
|
||||
"*rpc_responses": {"limit": 0, "ttl": "2s", "static_ttl": false, "precache": false}, // RPC responses caching
|
||||
"*closed_sessions": {"limit": -1, "ttl": "10s", "static_ttl": false, "precache": false}, // closed sessions cached for CDRs
|
||||
"*cdr_ids": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // protects CDRs against double-charging
|
||||
"*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false}, // control dispatcher routes caching
|
||||
"*diameter_messages": {"limit": -1, "ttl": "3h", "static_ttl": false}, // diameter messages caching
|
||||
"*rpc_responses": {"limit": 0, "ttl": "2s", "static_ttl": false}, // RPC responses caching
|
||||
"*closed_sessions": {"limit": -1, "ttl": "10s", "static_ttl": false}, // closed sessions cached for CDRs
|
||||
"*cdr_ids": {"limit": -1, "ttl": "", "static_ttl": false}, // protects CDRs against double-charging
|
||||
"*load_ids": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control the load_ids for items
|
||||
"*rpc_connections": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // RPC connections caching
|
||||
"*rpc_connections": {"limit": -1, "ttl": "", "static_ttl": false}, // RPC connections caching
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -106,8 +106,7 @@ func TestCacheJsonCfg(t *testing.T) {
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
utils.CacheEventResources: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false)},
|
||||
utils.CacheStatQueueProfiles: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
@@ -153,26 +152,20 @@ func TestCacheJsonCfg(t *testing.T) {
|
||||
utils.CacheDispatcherFilterIndexes: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false)},
|
||||
utils.CacheDispatcherRoutes: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false)},
|
||||
utils.CacheDiameterMessages: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer("3h"), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
Ttl: utils.StringPointer("3h"), Static_ttl: utils.BoolPointer(false)},
|
||||
utils.CacheRPCResponses: &CacheParamJsonCfg{Limit: utils.IntPointer(0),
|
||||
Ttl: utils.StringPointer("2s"), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
Ttl: utils.StringPointer("2s"), Static_ttl: utils.BoolPointer(false)},
|
||||
utils.CacheClosedSessions: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer("10s"), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
Ttl: utils.StringPointer("10s"), Static_ttl: utils.BoolPointer(false)},
|
||||
utils.CacheCDRIDs: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false)},
|
||||
utils.CacheLoadIDs: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
utils.CacheRPCConnections: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false),
|
||||
Precache: utils.BoolPointer(false)},
|
||||
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false)},
|
||||
}
|
||||
|
||||
if gCfg, err := dfCgrJsonCfg.CacheJsonCfg(); err != nil {
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
// "*timings": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // timings caching
|
||||
// "*resource_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control resource profiles caching
|
||||
// "*resources": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control resources caching
|
||||
// "*event_resources": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // matching resources to events
|
||||
// "*event_resources": {"limit": -1, "ttl": "", "static_ttl": false}, // matching resources to events
|
||||
// "*statqueue_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // statqueue profiles
|
||||
// "*statqueues": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // statqueues with metrics
|
||||
// "*threshold_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control threshold profiles caching
|
||||
@@ -162,13 +162,13 @@
|
||||
// "*attribute_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false}, // control attribute filter indexes caching
|
||||
// "*charger_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false}, // control charger filter indexes caching
|
||||
// "*dispatcher_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false}, // control dispatcher filter indexes caching
|
||||
// "*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control dispatcher routes caching
|
||||
// "*diameter_messages": {"limit": -1, "ttl": "3h", "static_ttl": false, "precache": false}, // diameter messages caching
|
||||
// "*rpc_responses": {"limit": 0, "ttl": "2s", "static_ttl": false, "precache": false}, // RPC responses caching
|
||||
// "*closed_sessions": {"limit": -1, "ttl": "10s", "static_ttl": false, "precache": false}, // closed sessions cached for CDRs
|
||||
// "*cdr_ids": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // protects CDRs against double-charging
|
||||
// "*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false}, // control dispatcher routes caching
|
||||
// "*diameter_messages": {"limit": -1, "ttl": "3h", "static_ttl": false}, // diameter messages caching
|
||||
// "*rpc_responses": {"limit": 0, "ttl": "2s", "static_ttl": false}, // RPC responses caching
|
||||
// "*closed_sessions": {"limit": -1, "ttl": "10s", "static_ttl": false}, // closed sessions cached for CDRs
|
||||
// "*cdr_ids": {"limit": -1, "ttl": "", "static_ttl": false}, // protects CDRs against double-charging
|
||||
// "*load_ids": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // control the load_ids for items
|
||||
// "*rpc_connections": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // RPC connections caching
|
||||
// "*rpc_connections": {"limit": -1, "ttl": "", "static_ttl": false}, // RPC connections caching
|
||||
// },
|
||||
|
||||
|
||||
|
||||
@@ -473,46 +473,46 @@ func TestCDRParseFieldValue(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCdrClone(t * testing.T){
|
||||
func TestCdrClone(t *testing.T) {
|
||||
cdr := &CDR{}
|
||||
eOut := &CDR{}
|
||||
if rcv := cdr.Clone(); !reflect.DeepEqual(rcv,eOut) {
|
||||
t.Errorf("Expecting: %+v, received: %+v",eOut,rcv)
|
||||
if rcv := cdr.Clone(); !reflect.DeepEqual(rcv, eOut) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eOut, rcv)
|
||||
}
|
||||
cdr = &CDR{
|
||||
CGRID: "CGRID_test",
|
||||
OrderID: 18,
|
||||
CGRID: "CGRID_test",
|
||||
OrderID: 18,
|
||||
SetupTime: time.Date(2020, time.April, 18, 23, 0, 4, 0, time.UTC),
|
||||
Usage: time.Duration(10),
|
||||
Usage: time.Duration(10),
|
||||
ExtraFields: map[string]string{
|
||||
"test1":"_test1_",
|
||||
"test2":"_test2_",
|
||||
"test1": "_test1_",
|
||||
"test2": "_test2_",
|
||||
},
|
||||
Partial: true,
|
||||
Cost: 0.74,
|
||||
Cost: 0.74,
|
||||
CostDetails: &EventCost{
|
||||
CGRID: "EventCost_CGRID",
|
||||
Cost: utils.Float64Pointer(0.74),
|
||||
Cost: utils.Float64Pointer(0.74),
|
||||
},
|
||||
}
|
||||
eOut = &CDR{
|
||||
CGRID: "CGRID_test",
|
||||
OrderID: 18,
|
||||
CGRID: "CGRID_test",
|
||||
OrderID: 18,
|
||||
SetupTime: time.Date(2020, time.April, 18, 23, 0, 4, 0, time.UTC),
|
||||
Usage: time.Duration(10),
|
||||
Usage: time.Duration(10),
|
||||
ExtraFields: map[string]string{
|
||||
"test1":"_test1_",
|
||||
"test2":"_test2_",
|
||||
"test1": "_test1_",
|
||||
"test2": "_test2_",
|
||||
},
|
||||
Partial: true,
|
||||
Cost: 0.74,
|
||||
Cost: 0.74,
|
||||
CostDetails: &EventCost{
|
||||
CGRID: "EventCost_CGRID",
|
||||
Cost: utils.Float64Pointer(0.74),
|
||||
Cost: utils.Float64Pointer(0.74),
|
||||
},
|
||||
}
|
||||
if rcv := cdr.Clone(); !reflect.DeepEqual(rcv,eOut) {
|
||||
t.Errorf("Expecting: %+v,\n received: %+v",eOut,rcv)
|
||||
if rcv := cdr.Clone(); !reflect.DeepEqual(rcv, eOut) {
|
||||
t.Errorf("Expecting: %+v,\n received: %+v", eOut, rcv)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -192,13 +192,13 @@ func (ec *EventCost) Clone() (cln *EventCost) {
|
||||
if ec.AccountSummary != nil {
|
||||
cln.AccountSummary = ec.AccountSummary.Clone()
|
||||
}
|
||||
if ec.Rating != nil {
|
||||
if ec.Rating != nil {
|
||||
cln.Rating = ec.Rating.Clone()
|
||||
}
|
||||
if ec.Accounting != nil {
|
||||
if ec.Accounting != nil {
|
||||
cln.Accounting = ec.Accounting.Clone()
|
||||
}
|
||||
if ec.RatingFilters != nil {
|
||||
if ec.RatingFilters != nil {
|
||||
cln.RatingFilters = ec.RatingFilters.Clone()
|
||||
}
|
||||
if ec.Rates != nil {
|
||||
|
||||
Reference in New Issue
Block a user