Simplify event cloning (ees)

This commit is contained in:
ionutboangiu
2024-02-09 11:34:10 -05:00
committed by Dan Christian Bogos
parent 3637e4364e
commit c5b197db6f
2 changed files with 2 additions and 5 deletions

View File

@@ -160,7 +160,7 @@ func (eeS *EventExporterS) V1ProcessEvent(ctx *context.Context, cgrEv *engine.CG
}
}
var exportEvent *utils.CGREvent
exportEvent := cgrEv.CGREvent
if eeCfg.Flags.GetBool(utils.MetaAttributes) {
if exportEvent, err = eeS.attrSProcessEvent(
cgrEv.CGREvent,
@@ -172,9 +172,6 @@ func (eeS *EventExporterS) V1ProcessEvent(ctx *context.Context, cgrEv *engine.CG
return
}
}
if exportEvent == nil {
exportEvent = cgrEv.CGREvent
}
eeS.eesMux.RLock()
eeCache, hasCache := eeS.eesChs[eeCfg.Type]

View File

@@ -69,7 +69,7 @@ func TestEEsExportEventChanges(t *testing.T) {
"ees": {
"enabled": true,
"attributes_conns":["*localhost"],
"attributes_conns":["*internal"],
"exporters": [
{
"id": "exporter1",