Remove <process_runs> const, adjust error messages and fix formatting in config

This commit is contained in:
ionutboangiu
2021-09-06 14:54:55 +03:00
committed by Dan Christian Bogos
parent c96c20f8ed
commit f06e3446c8
4 changed files with 3 additions and 4 deletions

View File

@@ -661,7 +661,7 @@ const CGRATES_CFG_JSON = `
"enabled": false, // starts attribute service: <true|false>
"stats_conns": [], // connections to StatS, empty to disable: <""|*internal|$rpc_conns_id>
"resources_conns": [], // connections to ResourceS, empty to disable: <""|*internal|$rpc_conns_id>
"accounts_conns": [], // connections to AccountS, empty to disable: <""|*internal|$rpc_conns_id>
"accounts_conns": [], // connections to AccountS, empty to disable: <""|*internal|$rpc_conns_id>
"indexed_selects": true, // enable profile matching exclusively on indexes
//"string_indexed_fields": [], // query indexes based on these fields for faster processing
"prefix_indexed_fields": [], // query indexes based on these fields for faster processing

View File

@@ -549,7 +549,7 @@ func (cfg *CGRConfig) checkConfigSanity() error {
return fmt.Errorf("<%s> invalid type", utils.AttributeS)
}
if processRuns < 1 {
return fmt.Errorf("<%s> process_runs needs to be bigger than 0", utils.AttributeS)
return fmt.Errorf("<%s> processRuns needs to be bigger than 0", utils.AttributeS)
}
}
if cfg.chargerSCfg.Enabled {

View File

@@ -991,7 +991,7 @@ func TestConfigSanityAttributesCfg(t *testing.T) {
utils.OptsAttributesProcessRuns: float64(0),
},
}
expected := "<AttributeS> process_runs needs to be bigger than 0"
expected := "<AttributeS> processRuns needs to be bigger than 0"
if err := cfg.checkConfigSanity(); err == nil || err.Error() != expected {
t.Errorf("Expecting: %+q received: %+q", expected, err)
}

View File

@@ -1873,7 +1873,6 @@ const (
// AttributeSCfg
IndexedSelectsCfg = "indexed_selects"
ProcessRunsCfg = "process_runs"
ProfileRunsCfg = "profile_runs"
NestedFieldsCfg = "nested_fields"