mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
EENoLksCfg for a configuration without locks
This commit is contained in:
@@ -980,6 +980,13 @@ func (cfg *CGRConfig) ERsCfg() *ERsCfg {
|
||||
|
||||
// EEsCfg reads the EventExporter configuration
|
||||
func (cfg *CGRConfig) EEsCfg() *EEsCfg {
|
||||
cfg.lks[EEsJson].RLock()
|
||||
defer cfg.lks[EEsJson].RUnlock()
|
||||
return cfg.eesCfg
|
||||
}
|
||||
|
||||
// EEsCfg reads the EventExporter configuration
|
||||
func (cfg *CGRConfig) EEsNoLksCfg() *EEsCfg {
|
||||
return cfg.eesCfg
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ func (eeS *EventExporterS) attrSProcessEvent(cgrEv *utils.CGREventWithOpts, attr
|
||||
ArgDispatcher: cgrEv.ArgDispatcher,
|
||||
}
|
||||
if err = eeS.connMgr.Call(
|
||||
eeS.cfg.EEsCfg().AttributeSConns, nil,
|
||||
eeS.cfg.EEsNoLksCfg().AttributeSConns, nil,
|
||||
utils.AttributeSv1ProcessEvent,
|
||||
attrArgs, &rplyEv); err == nil && len(rplyEv.AlteredFields) != 0 {
|
||||
cgrEv.CGREvent = rplyEv.CGREvent
|
||||
@@ -132,7 +132,7 @@ func (eeS *EventExporterS) V1ProcessEvent(cgrEv *utils.CGREventWithOpts, rply *s
|
||||
|
||||
var wg sync.WaitGroup
|
||||
var withErr bool
|
||||
for cfgIdx, eeCfg := range eeS.cfg.EEsCfg().Exporters {
|
||||
for cfgIdx, eeCfg := range eeS.cfg.EEsNoLksCfg().Exporters {
|
||||
|
||||
if len(eeCfg.Filters) != 0 {
|
||||
cgrDp := config.NewNavigableMap(map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user