changing db type constants with leading *

This commit is contained in:
gezimbll
2023-03-03 11:11:58 -05:00
committed by Dan Christian Bogos
parent f9b8fe38b8
commit 5c4bf0e538
31 changed files with 132 additions and 112 deletions

View File

@@ -27,6 +27,7 @@ import (
"os"
"os/exec"
"path"
"strings"
"time"
"github.com/cgrates/cgrates/config"
@@ -314,11 +315,12 @@ func InitStorDb(cfg *config.CGRConfig) error {
if err != nil {
return err
}
dbPath := strings.Trim(cfg.StorDbCfg().Type, "*")
if err := storDb.Flush(path.Join(cfg.DataFolderPath, "storage",
cfg.StorDbCfg().Type)); err != nil {
dbPath)); err != nil {
return err
}
if utils.IsSliceMember([]string{utils.Mongo, utils.MySQL, utils.Postgres},
if utils.IsSliceMember([]string{utils.MetaMongo, utils.MetaMySQL, utils.MetaPostgres},
cfg.StorDbCfg().Type) {
if err := SetDBVersions(storDb); err != nil {
return err