mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 05:09:54 +05:00
For *internalDB check store internal only when services are enabled
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"},
|
||||
|
||||
@@ -75,13 +75,10 @@
|
||||
],
|
||||
},
|
||||
|
||||
"stats": {
|
||||
"enabled": false,
|
||||
"store_interval": "-1",
|
||||
},
|
||||
|
||||
"scheduler": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -75,8 +75,10 @@
|
||||
],
|
||||
},
|
||||
|
||||
"stats": {
|
||||
"enabled": false,
|
||||
"store_interval": "-1",
|
||||
}
|
||||
|
||||
"scheduler": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user