mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 07:38:45 +05:00
Small fixups cgr-loader
This commit is contained in:
@@ -50,8 +50,8 @@ var (
|
||||
dataPath = flag.String("path", ".", "The path containing the data files")
|
||||
version = flag.Bool("version", false, "Prints the application version.")
|
||||
verbose = flag.Bool("verbose", false, "Enable detailed verbose logging output")
|
||||
fromStorDb = flag.Bool("from_stordb", false, "Load the tariff plan from storDb to dataDb")
|
||||
toStorDb = flag.Bool("to_stordb", false, "Import the tariff plan from files to storDb")
|
||||
fromStorDb = flag.Bool("from-stordb", false, "Load the tariff plan from storDb to dataDb")
|
||||
toStorDb = flag.Bool("to-stordb", false, "Import the tariff plan from files to storDb")
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -177,9 +177,7 @@ func (csvr *CSVReader) LoadDestinations() (err error) {
|
||||
if fp != nil {
|
||||
defer fp.Close()
|
||||
}
|
||||
fmt.Println("Should start loading destinations")
|
||||
for record, err := csvReader.Read(); err == nil; record, err = csvReader.Read() {
|
||||
fmt.Println("Reading destination line", record)
|
||||
tag := record[0]
|
||||
var dest *Destination
|
||||
for _, d := range csvr.destinations {
|
||||
@@ -489,7 +487,7 @@ func (csvr *CSVReader) LoadAccountActions() (err error) {
|
||||
defer fp.Close()
|
||||
}
|
||||
for record, err := csvReader.Read(); err == nil; record, err = csvReader.Read() {
|
||||
tag := fmt.Sprintf("%s:%s:%s", record[2][1:], record[0], record[1]) // Ignore * in front of direction
|
||||
tag := fmt.Sprintf("%s:%s:%s", record[2], record[0], record[1])
|
||||
aTriggers, exists := csvr.actionsTriggers[record[4]]
|
||||
if record[4] != "" && !exists {
|
||||
// only return error if there was something ther for the tag
|
||||
|
||||
Reference in New Issue
Block a user