From d4f7be865230123b60433e7ca4d371304d449461 Mon Sep 17 00:00:00 2001 From: TeoV Date: Thu, 17 Sep 2020 10:03:54 +0300 Subject: [PATCH] Rename from FilePath to ExportPath and remove redundant metric --- ees/filecsv.go | 3 +-- ees/filefwv.go | 3 +-- ees/httpjsonmap.go | 1 - ees/httppost.go | 1 - ees/virtualee.go | 1 - utils/consts.go | 1 - 6 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ees/filecsv.go b/ees/filecsv.go index 30c49c018..53b2d27ee 100644 --- a/ees/filecsv.go +++ b/ees/filecsv.go @@ -33,7 +33,6 @@ import ( func NewFileCSVee(cgrCfg *config.CGRConfig, cfgIdx int, filterS *engine.FilterS, dc utils.MapStorage) (fCsv *FileCSVee, err error) { - dc[utils.ExporterID] = cgrCfg.EEsCfg().Exporters[cfgIdx].ID fCsv = &FileCSVee{id: cgrCfg.EEsCfg().Exporters[cfgIdx].ID, cgrCfg: cgrCfg, cfgIdx: cfgIdx, filterS: filterS, dc: dc} err = fCsv.init() @@ -58,7 +57,7 @@ func (fCsv *FileCSVee) init() (err error) { filePath := path.Join(fCsv.cgrCfg.EEsCfg().Exporters[fCsv.cfgIdx].ExportPath, fCsv.id+utils.Underline+utils.UUIDSha1Prefix()+utils.CSVSuffix) fCsv.Lock() - fCsv.dc[utils.FilePath] = filePath + fCsv.dc[utils.ExportPath] = filePath fCsv.Unlock() if fCsv.file, err = os.Create(filePath); err != nil { return diff --git a/ees/filefwv.go b/ees/filefwv.go index 124449200..d666bdbbe 100644 --- a/ees/filefwv.go +++ b/ees/filefwv.go @@ -31,7 +31,6 @@ import ( ) func NewFileFWVee(cgrCfg *config.CGRConfig, cfgIdx int, filterS *engine.FilterS, dc utils.MapStorage) (fFwv *FileFWVee, err error) { - dc[utils.ExporterID] = cgrCfg.EEsCfg().Exporters[cfgIdx].ID fFwv = &FileFWVee{id: cgrCfg.EEsCfg().Exporters[cfgIdx].ID, cgrCfg: cgrCfg, cfgIdx: cfgIdx, filterS: filterS, dc: dc} err = fFwv.init() @@ -54,7 +53,7 @@ func (fFwv *FileFWVee) init() (err error) { filePath := path.Join(fFwv.cgrCfg.EEsCfg().Exporters[fFwv.cfgIdx].ExportPath, fFwv.id+utils.Underline+utils.UUIDSha1Prefix()+utils.FWVSuffix) fFwv.Lock() - fFwv.dc[utils.FilePath] = filePath + fFwv.dc[utils.ExportPath] = filePath fFwv.Unlock() // create the file if fFwv.file, err = os.Create(filePath); err != nil { diff --git a/ees/httpjsonmap.go b/ees/httpjsonmap.go index ca19374a8..a65a03a86 100644 --- a/ees/httpjsonmap.go +++ b/ees/httpjsonmap.go @@ -31,7 +31,6 @@ import ( func NewPosterJSONMapEE(cgrCfg *config.CGRConfig, cfgIdx int, filterS *engine.FilterS, dc utils.MapStorage) (pstrJSON *PosterJSONMapEE, err error) { - dc[utils.ExporterID] = cgrCfg.EEsCfg().Exporters[cfgIdx].ID pstrJSON = &PosterJSONMapEE{ id: cgrCfg.EEsCfg().Exporters[cfgIdx].ID, cgrCfg: cgrCfg, diff --git a/ees/httppost.go b/ees/httppost.go index e1a1b67a8..6cb8cab6e 100644 --- a/ees/httppost.go +++ b/ees/httppost.go @@ -31,7 +31,6 @@ import ( func NewHTTPPostEe(cgrCfg *config.CGRConfig, cfgIdx int, filterS *engine.FilterS, dc utils.MapStorage) (httpPost *HTTPPost, err error) { - dc[utils.ExporterID] = cgrCfg.EEsCfg().Exporters[cfgIdx].ID httpPost = &HTTPPost{id: cgrCfg.EEsCfg().Exporters[cfgIdx].ID, cgrCfg: cgrCfg, cfgIdx: cfgIdx, filterS: filterS, dc: dc} httpPost.httpPoster, err = engine.NewHTTPPoster(cgrCfg.GeneralCfg().HttpSkipTlsVerify, diff --git a/ees/virtualee.go b/ees/virtualee.go index 0bb24a0ae..2fc3d8928 100644 --- a/ees/virtualee.go +++ b/ees/virtualee.go @@ -28,7 +28,6 @@ import ( func NewVirtualExporter(cgrCfg *config.CGRConfig, cfgIdx int, filterS *engine.FilterS, dc utils.MapStorage) (vEe *VirtualEe, err error) { - dc[utils.ExporterID] = cgrCfg.EEsCfg().Exporters[cfgIdx].ID vEe = &VirtualEe{id: cgrCfg.EEsCfg().Exporters[cfgIdx].ID, cgrCfg: cgrCfg, cfgIdx: cfgIdx, filterS: filterS, dc: dc} err = vEe.init() diff --git a/utils/consts.go b/utils/consts.go index a014d72d6..83e3f1800 100755 --- a/utils/consts.go +++ b/utils/consts.go @@ -811,7 +811,6 @@ const ( Attempts = "Attempts" FieldSeparator = "FieldSeparator" ExportPath = "ExportPath" - ExporterID = "ExporterID" ExporterIDs = "ExporterIDs" TimeNow = "TimeNow" ExportFileName = "ExportFileName"