diff --git a/config/config_defaults.go b/config/config_defaults.go index e53c52eb5..5cf42361b 100755 --- a/config/config_defaults.go +++ b/config/config_defaults.go @@ -150,7 +150,7 @@ const CGRATES_CFG_JSON = ` }, -"scheduler": { +"schedulers": { "enabled": false, // start Scheduler service: "cdrs_conns": [], // connections to CDRs for *cdrlog actions <*internal|x.y.z.y:1234> "filters": [], // only execute actions matching these filters diff --git a/config/config_json.go b/config/config_json.go index 5aa77bcbb..6126a8d95 100644 --- a/config/config_json.go +++ b/config/config_json.go @@ -31,7 +31,7 @@ const ( STORDB_JSN = "stor_db" FilterSjsn = "filters" RALS_JSN = "rals" - SCHEDULER_JSN = "scheduler" + SCHEDULER_JSN = "schedulers" CDRS_JSN = "cdrs" CDRE_JSN = "cdre" CDRC_JSN = "cdrc" diff --git a/config/configsanity.go b/config/configsanity.go index af5dc658c..32b0be1aa 100644 --- a/config/configsanity.go +++ b/config/configsanity.go @@ -486,5 +486,12 @@ func (cfg *CGRConfig) checkConfigSanity() error { } } } + // Cache partitions check + for cacheID := range cfg.cacheCfg { + if _, has := utils.CachePartitions[cacheID]; !has { + return fmt.Errorf("<%s> partition <%s> not defined", utils.CacheS, cacheID) + } + } + return nil } diff --git a/config/configsanity_test.go b/config/configsanity_test.go index e02b06268..df1247745 100644 --- a/config/configsanity_test.go +++ b/config/configsanity_test.go @@ -580,8 +580,8 @@ func TestConfigSanityDataDB(t *testing.T) { cfg.dataDbCfg.DataDbType = utils.INTERNAL cfg.cacheCfg = CacheCfg{ - "test": &CacheParamCfg{ - Limit: 1, + utils.CacheTimings: &CacheParamCfg{ + Limit: 0, }, } if err := cfg.checkConfigSanity(); err != nil { @@ -641,3 +641,16 @@ func TestConfigSanityDataDB(t *testing.T) { } } +func TestConfigSanityCacheS(t *testing.T) { + cfg, _ = NewDefaultCGRConfig() + + cfg.cacheCfg = map[string]*CacheParamCfg{"wrong_partition_name": &CacheParamCfg{Limit: 10}} + if err := cfg.checkConfigSanity(); err == nil || err.Error() != " partition not defined" { + t.Error(err) + } + + cfg.cacheCfg = map[string]*CacheParamCfg{utils.CacheLoadIDs: &CacheParamCfg{Limit: 9}} + if err := cfg.checkConfigSanity(); err != nil { + t.Error(err) + } +} diff --git a/config/schedulercfg_test.go b/config/schedulercfg_test.go index e09dbff3c..28f6de995 100644 --- a/config/schedulercfg_test.go +++ b/config/schedulercfg_test.go @@ -35,7 +35,7 @@ func TestSchedulerCfgloadFromJsonCfg(t *testing.T) { t.Errorf("Expected: %+v ,recived: %+v", expected, schdcfg) } cfgJSONStr := `{ -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: "cdrs_conns": [], // address where to reach CDR Server, empty to disable CDR capturing <*internal|x.y.z.y:1234> }, diff --git a/data/conf/cgrates/cgrates.json b/data/conf/cgrates/cgrates.json index 989b129d7..15530a3d0 100755 --- a/data/conf/cgrates/cgrates.json +++ b/data/conf/cgrates/cgrates.json @@ -124,7 +124,7 @@ // }, -// "scheduler": { +// "schedulers": { // "enabled": false, // start Scheduler service: // "cdrs_conns": [], // connections to CDRs for *cdrlog actions <*internal|x.y.z.y:1234> // "filters": [], // only execute actions matching these filters diff --git a/data/conf/samples/acc_balance_keep/cgrates.json b/data/conf/samples/acc_balance_keep/cgrates.json index 8a9ce82a9..2130f26f8 100644 --- a/data/conf/samples/acc_balance_keep/cgrates.json +++ b/data/conf/samples/acc_balance_keep/cgrates.json @@ -36,7 +36,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*localhost"], }, diff --git a/data/conf/samples/acc_balance_keep_gob/cgrates.json b/data/conf/samples/acc_balance_keep_gob/cgrates.json index d3b0c4683..314de0549 100644 --- a/data/conf/samples/acc_balance_keep_gob/cgrates.json +++ b/data/conf/samples/acc_balance_keep_gob/cgrates.json @@ -43,7 +43,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["conn1"], }, diff --git a/data/conf/samples/actions/cgradmin.json b/data/conf/samples/actions/cgradmin.json index 6aaa5dc00..7154e9805 100644 --- a/data/conf/samples/actions/cgradmin.json +++ b/data/conf/samples/actions/cgradmin.json @@ -24,7 +24,7 @@ "enabled": true, // enable Rater service: }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: "cdrs_conns": ["*internal"], }, diff --git a/data/conf/samples/actions_gob/cgradmin.json b/data/conf/samples/actions_gob/cgradmin.json index 0a33ef910..93adf8d27 100644 --- a/data/conf/samples/actions_gob/cgradmin.json +++ b/data/conf/samples/actions_gob/cgradmin.json @@ -31,7 +31,7 @@ "enabled": true, // enable Rater service: }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: "cdrs_conns": ["*internal"], }, diff --git a/data/conf/samples/apier/apier.json b/data/conf/samples/apier/apier.json index 7601cb3e0..45a67c443 100644 --- a/data/conf/samples/apier/apier.json +++ b/data/conf/samples/apier/apier.json @@ -28,7 +28,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/cdrcflatstore/cgrates.json b/data/conf/samples/cdrcflatstore/cgrates.json index f6d14a123..def14dca8 100644 --- a/data/conf/samples/cdrcflatstore/cgrates.json +++ b/data/conf/samples/cdrcflatstore/cgrates.json @@ -20,7 +20,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/cdrcfwv/cgrates.json b/data/conf/samples/cdrcfwv/cgrates.json index bf2b550c5..a0bbd42c5 100644 --- a/data/conf/samples/cdrcfwv/cgrates.json +++ b/data/conf/samples/cdrcfwv/cgrates.json @@ -19,7 +19,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/cdrcfwvwithfilter/cgrates.json b/data/conf/samples/cdrcfwvwithfilter/cgrates.json index 04d0c70c7..88be685c1 100755 --- a/data/conf/samples/cdrcfwvwithfilter/cgrates.json +++ b/data/conf/samples/cdrcfwvwithfilter/cgrates.json @@ -19,7 +19,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/cdrewithattributes/cgrates.json b/data/conf/samples/cdrewithattributes/cgrates.json index 9960424d7..0a804b440 100755 --- a/data/conf/samples/cdrewithattributes/cgrates.json +++ b/data/conf/samples/cdrewithattributes/cgrates.json @@ -31,7 +31,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/cdrewithfilter/cgrates.json b/data/conf/samples/cdrewithfilter/cgrates.json index 03f3dd42e..ab1e01d78 100755 --- a/data/conf/samples/cdrewithfilter/cgrates.json +++ b/data/conf/samples/cdrewithfilter/cgrates.json @@ -32,7 +32,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/cdrsv1internal/cgrates.json b/data/conf/samples/cdrsv1internal/cgrates.json index 7c91ef772..3ee7c29fb 100644 --- a/data/conf/samples/cdrsv1internal/cgrates.json +++ b/data/conf/samples/cdrsv1internal/cgrates.json @@ -19,7 +19,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true }, diff --git a/data/conf/samples/cdrsv1mongo/cgrates.json b/data/conf/samples/cdrsv1mongo/cgrates.json index 747684b93..01f2da50d 100644 --- a/data/conf/samples/cdrsv1mongo/cgrates.json +++ b/data/conf/samples/cdrsv1mongo/cgrates.json @@ -22,7 +22,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true }, diff --git a/data/conf/samples/cdrsv1mysql/cgrates.json b/data/conf/samples/cdrsv1mysql/cgrates.json index 808ce5ecc..df0cfbe39 100644 --- a/data/conf/samples/cdrsv1mysql/cgrates.json +++ b/data/conf/samples/cdrsv1mysql/cgrates.json @@ -19,7 +19,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true }, diff --git a/data/conf/samples/cdrsv1postgres/cgrates.json b/data/conf/samples/cdrsv1postgres/cgrates.json index 64c4b7016..0fb2fbb62 100644 --- a/data/conf/samples/cdrsv1postgres/cgrates.json +++ b/data/conf/samples/cdrsv1postgres/cgrates.json @@ -21,7 +21,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true }, diff --git a/data/conf/samples/cdrsv1processevent/cgrates.json b/data/conf/samples/cdrsv1processevent/cgrates.json index 3ed6dec4b..639520563 100644 --- a/data/conf/samples/cdrsv1processevent/cgrates.json +++ b/data/conf/samples/cdrsv1processevent/cgrates.json @@ -53,7 +53,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true }, diff --git a/data/conf/samples/cdrsv1processeventmongo/cgrates.json b/data/conf/samples/cdrsv1processeventmongo/cgrates.json index 2cfbaed85..3ba28c86d 100644 --- a/data/conf/samples/cdrsv1processeventmongo/cgrates.json +++ b/data/conf/samples/cdrsv1processeventmongo/cgrates.json @@ -57,7 +57,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true }, diff --git a/data/conf/samples/cdrsv1processeventmysql/cgrates.json b/data/conf/samples/cdrsv1processeventmysql/cgrates.json index 6324fac0f..ebfb3a406 100644 --- a/data/conf/samples/cdrsv1processeventmysql/cgrates.json +++ b/data/conf/samples/cdrsv1processeventmysql/cgrates.json @@ -54,7 +54,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true }, diff --git a/data/conf/samples/cdrsv2internal/cgrates.json b/data/conf/samples/cdrsv2internal/cgrates.json index 189e4fbda..1905c99b9 100644 --- a/data/conf/samples/cdrsv2internal/cgrates.json +++ b/data/conf/samples/cdrsv2internal/cgrates.json @@ -18,7 +18,7 @@ "thresholds_conns": ["*localhost"], }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/cdrsv2mongo/cgrates.json b/data/conf/samples/cdrsv2mongo/cgrates.json index b0e5447e7..c4cc4c5cb 100644 --- a/data/conf/samples/cdrsv2mongo/cgrates.json +++ b/data/conf/samples/cdrsv2mongo/cgrates.json @@ -19,7 +19,7 @@ "thresholds_conns": ["*localhost"], }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/cdrsv2mongo_gob/cgrates.json b/data/conf/samples/cdrsv2mongo_gob/cgrates.json index d6d3b3de8..3d440a4ae 100644 --- a/data/conf/samples/cdrsv2mongo_gob/cgrates.json +++ b/data/conf/samples/cdrsv2mongo_gob/cgrates.json @@ -28,7 +28,7 @@ "thresholds_conns": ["conn1"], }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/cdrsv2mysql/cdrsv2mysql.json b/data/conf/samples/cdrsv2mysql/cdrsv2mysql.json index a7f59d7ef..83b43fbc7 100644 --- a/data/conf/samples/cdrsv2mysql/cdrsv2mysql.json +++ b/data/conf/samples/cdrsv2mysql/cdrsv2mysql.json @@ -19,7 +19,7 @@ "thresholds_conns": ["*localhost"], }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/cdrsv2mysql_gob/cdrsv2mysql.json b/data/conf/samples/cdrsv2mysql_gob/cdrsv2mysql.json index fb572c6d7..9253a8070 100644 --- a/data/conf/samples/cdrsv2mysql_gob/cdrsv2mysql.json +++ b/data/conf/samples/cdrsv2mysql_gob/cdrsv2mysql.json @@ -27,7 +27,7 @@ "thresholds_conns": ["conn1"], }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/cdrsv2psql/cdrsv2psql.json b/data/conf/samples/cdrsv2psql/cdrsv2psql.json index e876514df..84202251b 100644 --- a/data/conf/samples/cdrsv2psql/cdrsv2psql.json +++ b/data/conf/samples/cdrsv2psql/cdrsv2psql.json @@ -19,7 +19,7 @@ "thresholds_conns": ["*localhost"], }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/cluelrn/cgrates.json b/data/conf/samples/cluelrn/cgrates.json index 5f395e1f3..c13c9c294 100644 --- a/data/conf/samples/cluelrn/cgrates.json +++ b/data/conf/samples/cluelrn/cgrates.json @@ -33,7 +33,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dbinternal/cgrates.json b/data/conf/samples/dbinternal/cgrates.json index 2d68c3abc..62bdddcb8 100755 --- a/data/conf/samples/dbinternal/cgrates.json +++ b/data/conf/samples/dbinternal/cgrates.json @@ -30,7 +30,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/diamagent/cgrates.json b/data/conf/samples/diamagent/cgrates.json index 2a9db0992..dabe6b0a5 100644 --- a/data/conf/samples/diamagent/cgrates.json +++ b/data/conf/samples/diamagent/cgrates.json @@ -33,7 +33,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/diamagentmaxconn/cgrates.json b/data/conf/samples/diamagentmaxconn/cgrates.json index ef5bf446d..1d14010de 100755 --- a/data/conf/samples/diamagentmaxconn/cgrates.json +++ b/data/conf/samples/diamagentmaxconn/cgrates.json @@ -32,7 +32,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/diamsctpagent/cgrates.json b/data/conf/samples/diamsctpagent/cgrates.json index c68a09d90..32e26b650 100755 --- a/data/conf/samples/diamsctpagent/cgrates.json +++ b/data/conf/samples/diamsctpagent/cgrates.json @@ -33,7 +33,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dispatchers/all/cgrates.json b/data/conf/samples/dispatchers/all/cgrates.json index b27a8e241..a4321f0f4 100644 --- a/data/conf/samples/dispatchers/all/cgrates.json +++ b/data/conf/samples/dispatchers/all/cgrates.json @@ -42,7 +42,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dispatchers/all2/cgrates.json b/data/conf/samples/dispatchers/all2/cgrates.json index 967b613aa..46665883d 100644 --- a/data/conf/samples/dispatchers/all2/cgrates.json +++ b/data/conf/samples/dispatchers/all2/cgrates.json @@ -42,7 +42,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dispatchers/diamagent/cgrates.json b/data/conf/samples/dispatchers/diamagent/cgrates.json index b02125cfc..f98c70bcf 100644 --- a/data/conf/samples/dispatchers/diamagent/cgrates.json +++ b/data/conf/samples/dispatchers/diamagent/cgrates.json @@ -34,7 +34,7 @@ "enabled": true }, -"scheduler": { +"schedulers": { "enabled": true }, diff --git a/data/conf/samples/dispatchers/dispatchers/cgrates.json b/data/conf/samples/dispatchers/dispatchers/cgrates.json index e4b48e9fd..386e45435 100755 --- a/data/conf/samples/dispatchers/dispatchers/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers/cgrates.json @@ -32,7 +32,7 @@ "enabled": true }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dispatchers/dispatchers_gob/cgrates.json b/data/conf/samples/dispatchers/dispatchers_gob/cgrates.json index 899917205..6bc0819d0 100755 --- a/data/conf/samples/dispatchers/dispatchers_gob/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_gob/cgrates.json @@ -32,7 +32,7 @@ "enabled": true }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json index 02b429b39..a991c2a98 100644 --- a/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json @@ -36,7 +36,7 @@ "*dispatcher_routes": {"limit": -1, "ttl": "2s"} }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json index 05c207c3a..5329612e4 100644 --- a/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json @@ -36,7 +36,7 @@ "*dispatcher_routes": {"limit": -1, "ttl": "2s"} }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json b/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json index dbea5e3f0..f045eb330 100755 --- a/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json @@ -27,7 +27,7 @@ "*dispatcher_routes": {"limit": -1, "ttl": "2s"} }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dispatchers/radagent/cgrates.json b/data/conf/samples/dispatchers/radagent/cgrates.json index a96f72624..460de25ee 100644 --- a/data/conf/samples/dispatchers/radagent/cgrates.json +++ b/data/conf/samples/dispatchers/radagent/cgrates.json @@ -33,7 +33,7 @@ "enabled": true }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/dnsagent/cgrates.json b/data/conf/samples/dnsagent/cgrates.json index 3abe3eee5..66d1ff2e1 100644 --- a/data/conf/samples/dnsagent/cgrates.json +++ b/data/conf/samples/dnsagent/cgrates.json @@ -17,7 +17,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*internal"], }, diff --git a/data/conf/samples/dnsagent_reload/cgrates.json b/data/conf/samples/dnsagent_reload/cgrates.json index 8fceec86b..d546581f7 100644 --- a/data/conf/samples/dnsagent_reload/cgrates.json +++ b/data/conf/samples/dnsagent_reload/cgrates.json @@ -17,7 +17,7 @@ }, - "scheduler": { + "schedulers": { "enabled": true, "cdrs_conns": ["*internal"], }, diff --git a/data/conf/samples/ers/cgrates.json b/data/conf/samples/ers/cgrates.json index e4907f1da..87576f31d 100644 --- a/data/conf/samples/ers/cgrates.json +++ b/data/conf/samples/ers/cgrates.json @@ -27,7 +27,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/ers_example/cgrates.json b/data/conf/samples/ers_example/cgrates.json index f76b49090..2aa1c6610 100644 --- a/data/conf/samples/ers_example/cgrates.json +++ b/data/conf/samples/ers_example/cgrates.json @@ -26,7 +26,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/ers_reload/disabled/cgrates.json b/data/conf/samples/ers_reload/disabled/cgrates.json index 7b71ca8c8..179c571b0 100644 --- a/data/conf/samples/ers_reload/disabled/cgrates.json +++ b/data/conf/samples/ers_reload/disabled/cgrates.json @@ -26,7 +26,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/ers_reload/first_reload/cgrates.json b/data/conf/samples/ers_reload/first_reload/cgrates.json index e29ed097f..b298f251b 100644 --- a/data/conf/samples/ers_reload/first_reload/cgrates.json +++ b/data/conf/samples/ers_reload/first_reload/cgrates.json @@ -26,7 +26,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/ers_reload/internal/cgrates.json b/data/conf/samples/ers_reload/internal/cgrates.json index f27a37e9d..980056792 100644 --- a/data/conf/samples/ers_reload/internal/cgrates.json +++ b/data/conf/samples/ers_reload/internal/cgrates.json @@ -26,7 +26,7 @@ }, - "scheduler": { + "schedulers": { "enabled": true, }, diff --git a/data/conf/samples/ers_reload/second_reload/cgrates.json b/data/conf/samples/ers_reload/second_reload/cgrates.json index bfaf4cffc..8e4b5bba8 100644 --- a/data/conf/samples/ers_reload/second_reload/cgrates.json +++ b/data/conf/samples/ers_reload/second_reload/cgrates.json @@ -26,7 +26,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/filtered_scheduler/cgrates.json b/data/conf/samples/filtered_scheduler/cgrates.json index 725d588eb..25dcc0ea3 100644 --- a/data/conf/samples/filtered_scheduler/cgrates.json +++ b/data/conf/samples/filtered_scheduler/cgrates.json @@ -33,7 +33,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "filters": ["*suffix:~*act.AccountID:1001"], }, diff --git a/data/conf/samples/filtered_scheduler2/cgrates.json b/data/conf/samples/filtered_scheduler2/cgrates.json index d661deee2..a5728cada 100644 --- a/data/conf/samples/filtered_scheduler2/cgrates.json +++ b/data/conf/samples/filtered_scheduler2/cgrates.json @@ -33,7 +33,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "filters": ["*suffix:~*act.AccountID:1002;1003"], }, diff --git a/data/conf/samples/filters/cgrates.json b/data/conf/samples/filters/cgrates.json index 1f73700e2..b87e6d80b 100644 --- a/data/conf/samples/filters/cgrates.json +++ b/data/conf/samples/filters/cgrates.json @@ -33,7 +33,7 @@ "thresholds_conns": ["*localhost"], }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/filters_gob/cgrates.json b/data/conf/samples/filters_gob/cgrates.json index b1a467e99..386f95804 100644 --- a/data/conf/samples/filters_gob/cgrates.json +++ b/data/conf/samples/filters_gob/cgrates.json @@ -40,7 +40,7 @@ "thresholds_conns": ["conn1"], }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/fscsv/cgrates.json b/data/conf/samples/fscsv/cgrates.json index 8dac2ff96..6ed25a352 100644 --- a/data/conf/samples/fscsv/cgrates.json +++ b/data/conf/samples/fscsv/cgrates.json @@ -10,7 +10,7 @@ "enabled": true, // enable Rater service: }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/gocs/au_site/cgrates.json b/data/conf/samples/gocs/au_site/cgrates.json index 9afd5bcc5..2faf5837a 100644 --- a/data/conf/samples/gocs/au_site/cgrates.json +++ b/data/conf/samples/gocs/au_site/cgrates.json @@ -63,7 +63,7 @@ }, - "scheduler": { + "schedulers": { "enabled": true, }, diff --git a/data/conf/samples/gocs/dsp_site/cgrates.json b/data/conf/samples/gocs/dsp_site/cgrates.json index 462deae9a..498973f08 100644 --- a/data/conf/samples/gocs/dsp_site/cgrates.json +++ b/data/conf/samples/gocs/dsp_site/cgrates.json @@ -34,7 +34,7 @@ }, - "scheduler": { + "schedulers": { "enabled": true }, diff --git a/data/conf/samples/gocs/us_site/cgrates.json b/data/conf/samples/gocs/us_site/cgrates.json index 926ceef7c..8ae63e798 100644 --- a/data/conf/samples/gocs/us_site/cgrates.json +++ b/data/conf/samples/gocs/us_site/cgrates.json @@ -69,7 +69,7 @@ }, - "scheduler": { + "schedulers": { "enabled": true, "cdrs_conns": ["conn1"], }, diff --git a/data/conf/samples/httpagent/cgrates.json b/data/conf/samples/httpagent/cgrates.json index 522d0dc18..d2bc4b0a4 100644 --- a/data/conf/samples/httpagent/cgrates.json +++ b/data/conf/samples/httpagent/cgrates.json @@ -26,7 +26,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/httpagent_gob/cgrates.json b/data/conf/samples/httpagent_gob/cgrates.json index fb3ffe1a3..e7a01bfc8 100644 --- a/data/conf/samples/httpagent_gob/cgrates.json +++ b/data/conf/samples/httpagent_gob/cgrates.json @@ -33,7 +33,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/httpagenttls/cgrates.json b/data/conf/samples/httpagenttls/cgrates.json index c20c2d241..55cf8c726 100755 --- a/data/conf/samples/httpagenttls/cgrates.json +++ b/data/conf/samples/httpagenttls/cgrates.json @@ -37,7 +37,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/httpagenttls_gob/cgrates.json b/data/conf/samples/httpagenttls_gob/cgrates.json index d3430b6f8..b2d84dd90 100755 --- a/data/conf/samples/httpagenttls_gob/cgrates.json +++ b/data/conf/samples/httpagenttls_gob/cgrates.json @@ -46,7 +46,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/internal_broadcast_replication/cgrates.json b/data/conf/samples/internal_broadcast_replication/cgrates.json index d9c4a1f15..28bc833c9 100644 --- a/data/conf/samples/internal_broadcast_replication/cgrates.json +++ b/data/conf/samples/internal_broadcast_replication/cgrates.json @@ -43,7 +43,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["broadcast_conn"], }, diff --git a/data/conf/samples/loaders/tutmongo/cgrates.json b/data/conf/samples/loaders/tutmongo/cgrates.json index 689d6e18e..039737224 100644 --- a/data/conf/samples/loaders/tutmongo/cgrates.json +++ b/data/conf/samples/loaders/tutmongo/cgrates.json @@ -35,7 +35,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*localhost"], }, diff --git a/data/conf/samples/loaders/tutmysql/cgrates.json b/data/conf/samples/loaders/tutmysql/cgrates.json index 811edce97..9e450d7ff 100644 --- a/data/conf/samples/loaders/tutmysql/cgrates.json +++ b/data/conf/samples/loaders/tutmysql/cgrates.json @@ -32,7 +32,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*internal"], }, diff --git a/data/conf/samples/mongoatlas/cgrates.json b/data/conf/samples/mongoatlas/cgrates.json index cee81f51f..2e6f47f98 100755 --- a/data/conf/samples/mongoatlas/cgrates.json +++ b/data/conf/samples/mongoatlas/cgrates.json @@ -69,7 +69,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/mongoreplica/cgrates.json b/data/conf/samples/mongoreplica/cgrates.json index eaa984300..49ff460e4 100755 --- a/data/conf/samples/mongoreplica/cgrates.json +++ b/data/conf/samples/mongoreplica/cgrates.json @@ -41,7 +41,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/multiplecdrc/multiplecdrc_fwexport.json b/data/conf/samples/multiplecdrc/multiplecdrc_fwexport.json index d2a1d36b3..0de8dc003 100644 --- a/data/conf/samples/multiplecdrc/multiplecdrc_fwexport.json +++ b/data/conf/samples/multiplecdrc/multiplecdrc_fwexport.json @@ -12,7 +12,7 @@ "enabled": true, // enable Rater service: }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/precache/tutmongo/cgrates.json b/data/conf/samples/precache/tutmongo/cgrates.json index f60329883..de8aee208 100644 --- a/data/conf/samples/precache/tutmongo/cgrates.json +++ b/data/conf/samples/precache/tutmongo/cgrates.json @@ -65,7 +65,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/precache/tutmysql/cgrates.json b/data/conf/samples/precache/tutmysql/cgrates.json index 18375b091..db6b57653 100644 --- a/data/conf/samples/precache/tutmysql/cgrates.json +++ b/data/conf/samples/precache/tutmysql/cgrates.json @@ -61,7 +61,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/radagent/cgrates.json b/data/conf/samples/radagent/cgrates.json index affbe450a..56da763c8 100644 --- a/data/conf/samples/radagent/cgrates.json +++ b/data/conf/samples/radagent/cgrates.json @@ -31,7 +31,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/radagent_gob/cgrates.json b/data/conf/samples/radagent_gob/cgrates.json index 85e5874a1..02738624c 100644 --- a/data/conf/samples/radagent_gob/cgrates.json +++ b/data/conf/samples/radagent_gob/cgrates.json @@ -39,7 +39,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/remote_replication/engine1_mongo/cgrates.json b/data/conf/samples/remote_replication/engine1_mongo/cgrates.json index bbc4b6f8e..79bdb0c47 100644 --- a/data/conf/samples/remote_replication/engine1_mongo/cgrates.json +++ b/data/conf/samples/remote_replication/engine1_mongo/cgrates.json @@ -31,7 +31,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/remote_replication/engine1_redis/cgrates.json b/data/conf/samples/remote_replication/engine1_redis/cgrates.json index a01a3c578..1c77d4407 100644 --- a/data/conf/samples/remote_replication/engine1_redis/cgrates.json +++ b/data/conf/samples/remote_replication/engine1_redis/cgrates.json @@ -27,7 +27,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/remote_replication/engine2_mongo/cgrates.json b/data/conf/samples/remote_replication/engine2_mongo/cgrates.json index fca65e916..153473409 100644 --- a/data/conf/samples/remote_replication/engine2_mongo/cgrates.json +++ b/data/conf/samples/remote_replication/engine2_mongo/cgrates.json @@ -31,7 +31,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/remote_replication/engine2_redis/cgrates.json b/data/conf/samples/remote_replication/engine2_redis/cgrates.json index e4517eb9c..d040017ea 100644 --- a/data/conf/samples/remote_replication/engine2_redis/cgrates.json +++ b/data/conf/samples/remote_replication/engine2_redis/cgrates.json @@ -27,7 +27,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/remote_replication/internal/cgrates.json b/data/conf/samples/remote_replication/internal/cgrates.json index e53bc1466..ada4379c1 100644 --- a/data/conf/samples/remote_replication/internal/cgrates.json +++ b/data/conf/samples/remote_replication/internal/cgrates.json @@ -74,7 +74,7 @@ }, -"scheduler": { +"schedulers": { "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 b82669572..f5248e442 100644 --- a/data/conf/samples/remote_replication/internal_gob/cgrates.json +++ b/data/conf/samples/remote_replication/internal_gob/cgrates.json @@ -80,7 +80,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/rpccaching/cgrates.json b/data/conf/samples/rpccaching/cgrates.json index 390f424e6..ac7b666af 100644 --- a/data/conf/samples/rpccaching/cgrates.json +++ b/data/conf/samples/rpccaching/cgrates.json @@ -27,7 +27,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/sessions/cgrates.json b/data/conf/samples/sessions/cgrates.json index df6d8f605..efec2d2d4 100644 --- a/data/conf/samples/sessions/cgrates.json +++ b/data/conf/samples/sessions/cgrates.json @@ -26,7 +26,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/sessions_replication/smgreplcmaster/cgrates.json b/data/conf/samples/sessions_replication/smgreplcmaster/cgrates.json index 4fbcfc823..3ee5e3055 100644 --- a/data/conf/samples/sessions_replication/smgreplcmaster/cgrates.json +++ b/data/conf/samples/sessions_replication/smgreplcmaster/cgrates.json @@ -20,7 +20,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/sessions_replication/smgreplcslave/cgrates.json b/data/conf/samples/sessions_replication/smgreplcslave/cgrates.json index 0fd6acf3e..b0b5a9e68 100644 --- a/data/conf/samples/sessions_replication/smgreplcslave/cgrates.json +++ b/data/conf/samples/sessions_replication/smgreplcslave/cgrates.json @@ -33,7 +33,7 @@ "enabled": true, // start the CDR Server service: }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/smg/cgrates.json b/data/conf/samples/smg/cgrates.json index 5a51619e5..16a5680f8 100644 --- a/data/conf/samples/smg/cgrates.json +++ b/data/conf/samples/smg/cgrates.json @@ -28,7 +28,7 @@ }, }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/smg_automatic_debits/cgrates.json b/data/conf/samples/smg_automatic_debits/cgrates.json index 4d3cb210a..d3d5b5ad9 100644 --- a/data/conf/samples/smg_automatic_debits/cgrates.json +++ b/data/conf/samples/smg_automatic_debits/cgrates.json @@ -15,7 +15,7 @@ "enabled": true, // enable Rater service: }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/smg_gob/cgrates.json b/data/conf/samples/smg_gob/cgrates.json index c87afe23e..79cdfddcc 100644 --- a/data/conf/samples/smg_gob/cgrates.json +++ b/data/conf/samples/smg_gob/cgrates.json @@ -35,7 +35,7 @@ }, }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/smgeneric/cgrates.json b/data/conf/samples/smgeneric/cgrates.json index c446553b5..d9aa216a2 100644 --- a/data/conf/samples/smgeneric/cgrates.json +++ b/data/conf/samples/smgeneric/cgrates.json @@ -32,7 +32,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/conf/samples/smgreplcmaster/cgrates.json b/data/conf/samples/smgreplcmaster/cgrates.json index 0fa5133f3..24c05cf94 100644 --- a/data/conf/samples/smgreplcmaster/cgrates.json +++ b/data/conf/samples/smgreplcmaster/cgrates.json @@ -20,7 +20,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/smgreplcmaster_gob/cgrates.json b/data/conf/samples/smgreplcmaster_gob/cgrates.json index b81a327d5..fded1176d 100644 --- a/data/conf/samples/smgreplcmaster_gob/cgrates.json +++ b/data/conf/samples/smgreplcmaster_gob/cgrates.json @@ -20,7 +20,7 @@ "enabled": true, }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/smgreplcslave/cgrates.json b/data/conf/samples/smgreplcslave/cgrates.json index c6bdaba98..1ff07df45 100644 --- a/data/conf/samples/smgreplcslave/cgrates.json +++ b/data/conf/samples/smgreplcslave/cgrates.json @@ -32,7 +32,7 @@ "enabled": true, // start the CDR Server service: }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/smgreplcslave_gob/cgrates.json b/data/conf/samples/smgreplcslave_gob/cgrates.json index ddd3d61f1..fc2d3b79a 100644 --- a/data/conf/samples/smgreplcslave_gob/cgrates.json +++ b/data/conf/samples/smgreplcslave_gob/cgrates.json @@ -24,7 +24,7 @@ "enabled": true, // start the CDR Server service: }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/tutinternal/cgrates.json b/data/conf/samples/tutinternal/cgrates.json index e4bcaa4d1..94f18bfab 100644 --- a/data/conf/samples/tutinternal/cgrates.json +++ b/data/conf/samples/tutinternal/cgrates.json @@ -33,7 +33,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*internal"], }, diff --git a/data/conf/samples/tutmongo/cgrates.json b/data/conf/samples/tutmongo/cgrates.json index 8b5731b75..d33804425 100644 --- a/data/conf/samples/tutmongo/cgrates.json +++ b/data/conf/samples/tutmongo/cgrates.json @@ -36,7 +36,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*localhost"], }, diff --git a/data/conf/samples/tutmongo2/cgrates.json b/data/conf/samples/tutmongo2/cgrates.json index 9be1f9725..e6bf5417e 100644 --- a/data/conf/samples/tutmongo2/cgrates.json +++ b/data/conf/samples/tutmongo2/cgrates.json @@ -29,7 +29,7 @@ -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*localhost"], }, diff --git a/data/conf/samples/tutmongo2_gob/cgrates.json b/data/conf/samples/tutmongo2_gob/cgrates.json index 70dac5ef0..05a874d40 100644 --- a/data/conf/samples/tutmongo2_gob/cgrates.json +++ b/data/conf/samples/tutmongo2_gob/cgrates.json @@ -36,7 +36,7 @@ -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["conn1"], }, diff --git a/data/conf/samples/tutmongo_gob/cgrates.json b/data/conf/samples/tutmongo_gob/cgrates.json index a60cd11c7..7ede59603 100644 --- a/data/conf/samples/tutmongo_gob/cgrates.json +++ b/data/conf/samples/tutmongo_gob/cgrates.json @@ -43,7 +43,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["conn1"], }, diff --git a/data/conf/samples/tutmongonew/cgrates.json b/data/conf/samples/tutmongonew/cgrates.json index 5e18278a6..25f567e84 100644 --- a/data/conf/samples/tutmongonew/cgrates.json +++ b/data/conf/samples/tutmongonew/cgrates.json @@ -35,7 +35,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/conf/samples/tutmysql/cgrates.json b/data/conf/samples/tutmysql/cgrates.json index a80f346c9..c0f88443a 100644 --- a/data/conf/samples/tutmysql/cgrates.json +++ b/data/conf/samples/tutmysql/cgrates.json @@ -33,7 +33,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*internal"], }, diff --git a/data/conf/samples/tutmysql2/cgrates.json b/data/conf/samples/tutmysql2/cgrates.json index e80c4a49e..1bcf144bd 100644 --- a/data/conf/samples/tutmysql2/cgrates.json +++ b/data/conf/samples/tutmysql2/cgrates.json @@ -21,7 +21,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*localhost"], }, diff --git a/data/conf/samples/tutmysql2_gob/cgrates.json b/data/conf/samples/tutmysql2_gob/cgrates.json index 26ef654f4..d1cabb844 100644 --- a/data/conf/samples/tutmysql2_gob/cgrates.json +++ b/data/conf/samples/tutmysql2_gob/cgrates.json @@ -29,7 +29,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["conn1"], }, diff --git a/data/conf/samples/tutmysql_internal/cgrates.json b/data/conf/samples/tutmysql_internal/cgrates.json index 16d7263cd..fb4e6fa8a 100644 --- a/data/conf/samples/tutmysql_internal/cgrates.json +++ b/data/conf/samples/tutmysql_internal/cgrates.json @@ -31,7 +31,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, "cdrs_conns": ["*internal"], }, diff --git a/data/conf/samples/tutpostgres/cgrates.json b/data/conf/samples/tutpostgres/cgrates.json index d4a551145..197b7d592 100644 --- a/data/conf/samples/tutpostgres/cgrates.json +++ b/data/conf/samples/tutpostgres/cgrates.json @@ -32,7 +32,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, // start Scheduler service: }, diff --git a/data/tutorial_tests/asterisk_ari/cgrates/etc/cgrates/cgrates.json b/data/tutorial_tests/asterisk_ari/cgrates/etc/cgrates/cgrates.json index 7eb0ee043..ccbb8e692 100644 --- a/data/tutorial_tests/asterisk_ari/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorial_tests/asterisk_ari/cgrates/etc/cgrates/cgrates.json @@ -22,7 +22,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/tutorial_tests/fs_evsock/cgrates/etc/cgrates/cgrates.json b/data/tutorial_tests/fs_evsock/cgrates/etc/cgrates/cgrates.json index fb0351bc1..57496da74 100644 --- a/data/tutorial_tests/fs_evsock/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorial_tests/fs_evsock/cgrates/etc/cgrates/cgrates.json @@ -21,7 +21,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/tutorial_tests/kamevapi/cgrates/etc/cgrates/cgrates.json b/data/tutorial_tests/kamevapi/cgrates/etc/cgrates/cgrates.json index 1c668aa9e..707580b75 100644 --- a/data/tutorial_tests/kamevapi/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorial_tests/kamevapi/cgrates/etc/cgrates/cgrates.json @@ -22,7 +22,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/tutorial_tests/osips/cgrates/etc/cgrates/cgrates.json b/data/tutorial_tests/osips/cgrates/etc/cgrates/cgrates.json index df5eba80a..10f3c519d 100644 --- a/data/tutorial_tests/osips/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorial_tests/osips/cgrates/etc/cgrates/cgrates.json @@ -17,7 +17,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/tutorials/asterisk_ari/cgrates/etc/cgrates/cgrates.json b/data/tutorials/asterisk_ari/cgrates/etc/cgrates/cgrates.json index 0864ba38b..cb167a753 100644 --- a/data/tutorials/asterisk_ari/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorials/asterisk_ari/cgrates/etc/cgrates/cgrates.json @@ -22,7 +22,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/tutorials/fs_evsock/cgrates/etc/cgrates/cgrates.json b/data/tutorials/fs_evsock/cgrates/etc/cgrates/cgrates.json index bc55482c3..a5271231b 100644 --- a/data/tutorials/fs_evsock/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorials/fs_evsock/cgrates/etc/cgrates/cgrates.json @@ -21,7 +21,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/tutorials/kamevapi/cgrates/etc/cgrates/cgrates.json b/data/tutorials/kamevapi/cgrates/etc/cgrates/cgrates.json index 99673121f..6c27993d0 100644 --- a/data/tutorials/kamevapi/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorials/kamevapi/cgrates/etc/cgrates/cgrates.json @@ -22,7 +22,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/data/tutorials/osips/cgrates/etc/cgrates/cgrates.json b/data/tutorials/osips/cgrates/etc/cgrates/cgrates.json index 07a92f037..41b7c91d7 100644 --- a/data/tutorials/osips/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorials/osips/cgrates/etc/cgrates/cgrates.json @@ -17,7 +17,7 @@ }, -"scheduler": { +"schedulers": { "enabled": true, }, diff --git a/docs/architecture.rst b/docs/architecture.rst index fe5b11a65..ad4c967fe 100644 --- a/docs/architecture.rst +++ b/docs/architecture.rst @@ -107,7 +107,7 @@ Used to execute periodic/scheduled tasks. "data_db" - (dataDb) - Config section in the CGRateS configuration file: - - ``"scheduler": {...}`` + - ``"schedulers": {...}`` 2.1.3. SessionManager service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/sessions/sessions_rpl_it_test.go b/sessions/sessions_rpl_it_test.go index 6d93fb0b4..fd637a29f 100644 --- a/sessions/sessions_rpl_it_test.go +++ b/sessions/sessions_rpl_it_test.go @@ -467,6 +467,58 @@ func TestSessionSRplManualReplicate(t *testing.T) { } } +func TestSessionSRplActivateSessions(t *testing.T) { + var aSessions []*ExternalSession + var reply string + // Activate first session (with ID: ede927f8e42318a8db02c0f74adc2d9e16770339) + args := []string{"ede927f8e42318a8db02c0f74adc2d9e16770339"} + if err := smgRplcMstrRPC.Call(utils.SessionSv1ActivateSessions, args, &reply); err != nil { + t.Error(err) + } + // Check the sessions on master engine (at this point should have one active and one passive session) + if err := smgRplcMstrRPC.Call(utils.SessionSv1GetPassiveSessions, new(utils.SessionFilter), &aSessions); err != nil { + t.Error(err) + } else if len(aSessions) != 1 { + t.Errorf("Expecting: 1 session, received: %+v sessions", len(aSessions)) + } + if err := smgRplcMstrRPC.Call(utils.SessionSv1GetActiveSessions, new(utils.SessionFilter), &aSessions); err != nil { + t.Error(err) + } else if len(aSessions) != 1 { + t.Errorf("Expecting: 1 session, received: %+v sessions", len(aSessions)) + } + // Check the sessions on slave engine (at this point should have one active and one passive session) + // if err := smgRplcSlvRPC.Call(utils.SessionSv1GetPassiveSessions, new(utils.SessionFilter), &aSessions); err != nil { + // t.Error(err) + // } else if len(aSessions) != 1 { + // t.Errorf("Expecting: 1 session, received: %+v sessions", len(aSessions)) //received 2 + // } + // if err := smgRplcSlvRPC.Call(utils.SessionSv1GetActiveSessions, new(utils.SessionFilter), &aSessions); err != nil { + // t.Error(err) //received not found + // } else if len(aSessions) != 1 { + // t.Errorf("Expecting: 1 session, received: %+v sessions", len(aSessions)) + // } + //activate the second session (with ID: 3b0417028f8cefc0e02ddbd37a6dda6fbef4f5e0) + args = []string{"3b0417028f8cefc0e02ddbd37a6dda6fbef4f5e0"} + if err := smgRplcMstrRPC.Call(utils.SessionSv1ActivateSessions, args, &reply); err != nil { + t.Error(err) + } + //Check the sessions on master engine (2 active, 0 passive) + if err := smgRplcMstrRPC.Call(utils.SessionSv1GetActiveSessions, new(utils.SessionFilter), &aSessions); err != nil { + t.Error(err) + } else if len(aSessions) != 2 { + t.Errorf("Expecting: 2 session, received: %+v sessions", len(aSessions)) + } + if err := smgRplcMstrRPC.Call(utils.SessionSv1GetPassiveSessions, new(utils.SessionFilter), &aSessions); err == nil || err.Error() != utils.ErrNotFound.Error() { + t.Error(err) + } + //check the number of passive sessions on slave engine + if err := smgRplcSlvRPC.Call(utils.SessionSv1GetPassiveSessions, new(utils.SessionFilter), &aSessions); err != nil { + t.Error(err) + } else if len(aSessions) != 2 { + t.Errorf("Expecting: 2 session, received: %+v sessions", len(aSessions)) + } +} + func TestSessionSRplStopCgrEngine(t *testing.T) { if err := engine.KillEngine(1000); err != nil { t.Error(err) diff --git a/utils/dateseries.go b/utils/dateseries.go index 8030c780c..cb3bf2696 100644 --- a/utils/dateseries.go +++ b/utils/dateseries.go @@ -216,7 +216,7 @@ func (md MonthDays) Contains(monthDay int) (result bool) { // Parse MonthDay elements from string separated by sep. func (md *MonthDays) Parse(input, sep string) { switch input { - case "*any", "": + case META_ANY, EmptyString: *md = []int{} default: elements := strings.Split(input, sep) diff --git a/utils/dateseries_test.go b/utils/dateseries_test.go index c3306aaf5..48e1e24d4 100644 --- a/utils/dateseries_test.go +++ b/utils/dateseries_test.go @@ -273,7 +273,43 @@ func TestMonthDaysLess(t *testing.T) { } -// +func TestMonthDaysContains(t *testing.T) { + md := MonthDays{24, 25, 26} + if !md.Contains(24) { + t.Errorf("Expected: true, received: false") + } else if md.Contains(23) { + t.Errorf("Expected: false, received: true") + } +} + +func TestMonthDaysParse(t *testing.T) { + md1 := MonthDays{} + md1.Parse(META_ANY, EmptyString) + + eOut := MonthDays{24, 25, 26} + md1.Parse("24,25,26", ",") + if !reflect.DeepEqual(eOut, md1) { + t.Errorf("Expected: %+v, received: %+v", eOut, md1) + } +} + +func TestMonthDaysSerialize(t *testing.T) { + md := &MonthDays{} + if rcv := md.Serialize(INFIELD_SEP); !reflect.DeepEqual(META_ANY, rcv) { + t.Errorf("Expected: %s, received: %s", META_ANY, rcv) + } + + md = &MonthDays{1} + if rcv := md.Serialize(INFIELD_SEP); !reflect.DeepEqual("1", rcv) { + t.Errorf("Expected: '1', received: %s", rcv) + } + + md = &MonthDays{1, 2, 3, 4, 5} + if rcv := md.Serialize(INFIELD_SEP); !reflect.DeepEqual("1;2;3;4;5", rcv) { + t.Errorf("Expected: '1;2;3;4;5', received: %s", rcv) + } +} + func TestMonthStoreRestoreJson(t *testing.T) { m := Months{time.May, time.June, time.July, time.August} r, _ := json.Marshal(m) @@ -313,27 +349,6 @@ func TestWeekDayStoreRestoreJson(t *testing.T) { } } -func TestMonthDaysSerialize(t *testing.T) { - mds := &MonthDays{} - mdsString := mds.Serialize(";") - expectString := "*any" - if expectString != mdsString { - t.Errorf("Expected: %s, got: %s", expectString, mdsString) - } - mds2 := &MonthDays{1} - mdsString2 := mds2.Serialize(";") - expectString2 := "1" - if expectString2 != mdsString2 { - t.Errorf("Expected: %s, got: %s", expectString2, mdsString2) - } - mds3 := &MonthDays{1, 2, 3, 4, 5} - mdsString3 := mds3.Serialize(";") - expectString3 := "1;2;3;4;5" - if expectString3 != mdsString3 { - t.Errorf("Expected: %s, got: %s", expectString3, mdsString3) - } -} - func TestWeekDaysSerialize(t *testing.T) { wds := &WeekDays{} wdsString := wds.Serialize(";") @@ -424,19 +439,6 @@ func TestWeekDaysParse(t *testing.T) { } } -func TestMonthDaysParse(t *testing.T) { - md1 := MonthDays{} - md2 := MonthDays{24, 25, 26} - in := "24,25,26" - if reflect.DeepEqual(md2, md1) != false { - t.Errorf("Expected: %+v, received: %+v", MonthDays{}, md1) - } - md1.Parse(in, ",") - if !reflect.DeepEqual(md2, md1) { - t.Errorf("Expected: %+v, received: %+v", md2, md1) - } -} - func TestWeekDaysContains(t *testing.T) { wds := WeekDays{time.Monday, time.Tuesday} if wds.Contains(time.Monday) != true { @@ -445,12 +447,3 @@ func TestWeekDaysContains(t *testing.T) { t.Errorf("Expected: false, got: %v", !false) } } - -func TestMonthDaysContains(t *testing.T) { - md := MonthDays{24, 25, 26} - if md.Contains(24) != true { - t.Errorf("Expected: true, got: %v", !true) - } else if md.Contains(23) != false { - t.Errorf("Expected: false, got: %v", !false) - } -}