diff --git a/config/config.go b/config/config.go index 6f34911c0..af813b6ce 100755 --- a/config/config.go +++ b/config/config.go @@ -705,13 +705,13 @@ func (cfg *CGRConfig) checkConfigSanity() error { return fmt.Errorf("<%s> %s needs to be 0 when DataBD is *internal, received : %d", utils.CacheS, key, config.Limit) } } - if cfg.resourceSCfg.StoreInterval != -1 { + if cfg.resourceSCfg.Enabled == true && cfg.resourceSCfg.StoreInterval != -1 { return fmt.Errorf("<%s> StoreInterval needs to be -1 when DataBD is *internal, received : %d", utils.ResourceS, cfg.resourceSCfg.StoreInterval) } - if cfg.statsCfg.StoreInterval != -1 { + if cfg.statsCfg.Enabled == true && cfg.statsCfg.StoreInterval != -1 { return fmt.Errorf("<%s> StoreInterval needs to be -1 when DataBD is *internal, received : %d", utils.StatS, cfg.statsCfg.StoreInterval) } - if cfg.thresholdSCfg.StoreInterval != -1 { + if cfg.thresholdSCfg.Enabled == true && cfg.thresholdSCfg.StoreInterval != -1 { return fmt.Errorf("<%s> StoreInterval needs to be -1 when DataBD is *internal, received : %d", utils.ThresholdS, cfg.thresholdSCfg.StoreInterval) } } diff --git a/data/conf/samples/cdrsv1internal/cgrates.json b/data/conf/samples/cdrsv1internal/cgrates.json index b8083ef3a..a123adfd7 100644 --- a/data/conf/samples/cdrsv1internal/cgrates.json +++ b/data/conf/samples/cdrsv1internal/cgrates.json @@ -37,18 +37,6 @@ }, -"resources": { - "store_interval": "-1" -}, - -"stats": { - "store_interval": "-1" -}, - -"thresholds": { - "store_interval": "-1" -}, - "apier": { "scheduler_conns": [ // connections to SchedulerS for reloads {"address": "*internal"}, diff --git a/data/conf/samples/remote_replication/internal/cgrates.json b/data/conf/samples/remote_replication/internal/cgrates.json index 07778b64b..80193f5be 100644 --- a/data/conf/samples/remote_replication/internal/cgrates.json +++ b/data/conf/samples/remote_replication/internal/cgrates.json @@ -75,13 +75,10 @@ ], }, -"stats": { - "enabled": false, - "store_interval": "-1", -}, "scheduler": { "enabled": true, }, + } diff --git a/data/conf/samples/remote_replication/internal_gob/cgrates.json b/data/conf/samples/remote_replication/internal_gob/cgrates.json index dcf95fabe..8b3bc5da5 100644 --- a/data/conf/samples/remote_replication/internal_gob/cgrates.json +++ b/data/conf/samples/remote_replication/internal_gob/cgrates.json @@ -75,8 +75,10 @@ ], }, - "stats": { - "enabled": false, - "store_interval": "-1", - } + +"scheduler": { + "enabled": true, +}, + + }