mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
set default *file_csv cache TTL to 5s
File exporters require positive TTL as content is flushed only upon cache expiration.
This commit is contained in:
committed by
Dan Christian Bogos
parent
de448ae11c
commit
364827ab58
@@ -401,7 +401,7 @@ func testConfigSSetConfigEEs(t *testing.T) {
|
||||
"enabled": true,
|
||||
"attributes_conns": []any{},
|
||||
"cache": map[string]any{
|
||||
"*file_csv": map[string]any{"limit": -1., "precache": false, "replicate": false, "static_ttl": false, "remote": false},
|
||||
"*file_csv": map[string]any{"limit": -1., "ttl": "5s", "precache": false, "replicate": false, "static_ttl": false, "remote": false},
|
||||
"*amqp_json_map": map[string]any{"limit": -1., "precache": false, "replicate": false, "static_ttl": false, "remote": false},
|
||||
"*amqpv1_json_map": map[string]any{"limit": -1., "precache": false, "replicate": false, "static_ttl": false, "remote": false},
|
||||
"*els": map[string]any{"limit": -1., "precache": false, "replicate": false, "static_ttl": false, "remote": false},
|
||||
|
||||
@@ -504,7 +504,7 @@ const CGRATES_CFG_JSON = `
|
||||
"enabled": false, // starts the EventReader service: <true|false>
|
||||
"attributes_conns":[], // RPC Connections IDs
|
||||
"cache": {
|
||||
"*file_csv": {"limit": -1, "ttl": "", "static_ttl": false},
|
||||
"*file_csv": {"limit": -1, "ttl": "5s", "static_ttl": false},
|
||||
"*nats_json_map": {"limit": -1, "ttl": "", "static_ttl": false},
|
||||
"*amqp_json_map": {"limit": -1, "ttl": "", "static_ttl": false},
|
||||
"*amqpv1_json_map": {"limit": -1, "ttl": "", "static_ttl": false},
|
||||
|
||||
@@ -2148,7 +2148,7 @@ func TestDfEventExporterCfg(t *testing.T) {
|
||||
Cache: &map[string]*CacheParamJsonCfg{
|
||||
utils.MetaFileCSV: {
|
||||
Limit: utils.IntPointer(-1),
|
||||
Ttl: utils.StringPointer(""),
|
||||
Ttl: utils.StringPointer("5s"),
|
||||
Static_ttl: utils.BoolPointer(false),
|
||||
},
|
||||
utils.MetaSQL: {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -553,6 +553,7 @@ func TestEventExporterSameID(t *testing.T) {
|
||||
Cache: map[string]*CacheParamCfg{
|
||||
utils.MetaFileCSV: {
|
||||
Limit: -1,
|
||||
TTL: 5 * time.Second,
|
||||
StaticTTL: false,
|
||||
},
|
||||
utils.MetaSQL: {
|
||||
|
||||
Reference in New Issue
Block a user