cfg: move failed_posts to ees, add static_ttl

This commit is contained in:
ionutboangiu
2025-10-24 17:41:53 +03:00
committed by Dan Christian Bogos
parent 082c412159
commit 295ddec792
45 changed files with 324 additions and 208 deletions

View File

@@ -1357,7 +1357,7 @@ func (apierSv1 *APIerSv1) ReplayFailedPosts(ctx *context.Context, args ReplayFai
// Set default directories if not provided.
if args.SourcePath == "" {
args.SourcePath = apierSv1.Config.GeneralCfg().FailedPostsDir
args.SourcePath = apierSv1.Config.EEsCfg().FailedPosts.Dir
}
if args.FailedPath == "" {
args.FailedPath = args.SourcePath

View File

@@ -400,6 +400,11 @@ func testConfigSSetConfigEEs(t *testing.T) {
exp := map[string]any{
"enabled": true,
"attributes_conns": []any{},
utils.FailedPostsCfg: map[string]any{
utils.DirCfg: "/var/spool/cgrates/failed_posts",
utils.TTLCfg: "5s",
utils.StaticTTLCfg: true,
},
"cache": map[string]any{
"*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},