mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Rename from FilePath to ExportPath and remove redundant metric
This commit is contained in:
committed by
Dan Christian Bogos
parent
30b348d694
commit
d4f7be8652
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -811,7 +811,6 @@ const (
|
||||
Attempts = "Attempts"
|
||||
FieldSeparator = "FieldSeparator"
|
||||
ExportPath = "ExportPath"
|
||||
ExporterID = "ExporterID"
|
||||
ExporterIDs = "ExporterIDs"
|
||||
TimeNow = "TimeNow"
|
||||
ExportFileName = "ExportFileName"
|
||||
|
||||
Reference in New Issue
Block a user