mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Renamed "cgr.lock" to ".cgr.lock" and put both in and out dirs in the same for loop
This commit is contained in:
committed by
Dan Christian Bogos
parent
b43ffcd7be
commit
524d9c1f66
@@ -479,12 +479,7 @@ func (self *CGRConfig) checkConfigSanity() error {
|
||||
if !ldrSCfg.Enabled {
|
||||
continue
|
||||
}
|
||||
for _, dir := range []string{ldrSCfg.TpInDir} {
|
||||
if _, err := os.Stat(dir); err != nil && os.IsNotExist(err) {
|
||||
fmt.Errorf("Nonexistent folder: %s", dir)
|
||||
}
|
||||
}
|
||||
for _, dir := range []string{ldrSCfg.TpOutDir} {
|
||||
for _, dir := range []string{ldrSCfg.TpInDir, ldrSCfg.TpOutDir} {
|
||||
if _, err := os.Stat(dir); err != nil && os.IsNotExist(err) {
|
||||
fmt.Errorf("Nonexistent folder: %s", dir)
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ const CGRATES_CFG_JSON = `
|
||||
"enabled": false, // starts as service: <true|false>.
|
||||
"dry_run": false, // do not send the CDRs to CDRS, just parse them
|
||||
"run_delay": 0, // sleep interval in seconds between consecutive runs, 0 to use automation via inotify
|
||||
"lock_filename": "cgr.lock", // Filename containing concurrency lock in case of delayed processing
|
||||
"lock_filename": ".cgr.lock", // Filename containing concurrency lock in case of delayed processing
|
||||
"caches_conns": [
|
||||
{"address": "*internal"}, // address where to reach the CacheS for data reload, empty for no reloads <""|*internal|x.y.z.y:1234>
|
||||
],
|
||||
|
||||
@@ -815,7 +815,7 @@ func TestDfLoaderSJsonCfg(t *testing.T) {
|
||||
Enabled: utils.BoolPointer(false),
|
||||
Dry_run: utils.BoolPointer(false),
|
||||
Run_delay: utils.IntPointer(0),
|
||||
Lock_filename: utils.StringPointer("cgr.lock"),
|
||||
Lock_filename: utils.StringPointer(".cgr.lock"),
|
||||
Caches_conns: &[]*HaPoolJsonCfg{&HaPoolJsonCfg{
|
||||
Address: utils.StringPointer(utils.MetaInternal),
|
||||
}},
|
||||
|
||||
@@ -923,7 +923,7 @@ func TestLoaderDefaults(t *testing.T) {
|
||||
Enabled: false,
|
||||
DryRun: false,
|
||||
RunDelay: 0,
|
||||
LockFileName: "cgr.lock",
|
||||
LockFileName: ".cgr.lock",
|
||||
CacheSConns: []*HaPoolConfig{
|
||||
&HaPoolConfig{
|
||||
Address: utils.MetaInternal,
|
||||
|
||||
Reference in New Issue
Block a user