Rename from FilePath to ExportPath and remove redundant metric

This commit is contained in:
TeoV
2020-09-17 10:03:54 +03:00
committed by Dan Christian Bogos
parent 30b348d694
commit d4f7be8652
6 changed files with 2 additions and 8 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -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,

View File

@@ -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,

View File

@@ -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()

View File

@@ -811,7 +811,6 @@ const (
Attempts = "Attempts"
FieldSeparator = "FieldSeparator"
ExportPath = "ExportPath"
ExporterID = "ExporterID"
ExporterIDs = "ExporterIDs"
TimeNow = "TimeNow"
ExportFileName = "ExportFileName"