From 6f4161dbca2d880a7659ff5016be2fa36078d223 Mon Sep 17 00:00:00 2001 From: TeoV Date: Tue, 8 Dec 2020 14:47:38 +0200 Subject: [PATCH] Resolve merge problems --- cmd/cgr-engine/cgr-engine.go | 2 ++ services/actions.go | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/cgr-engine/cgr-engine.go b/cmd/cgr-engine/cgr-engine.go index 286642807..cdf393020 100644 --- a/cmd/cgr-engine/cgr-engine.go +++ b/cmd/cgr-engine/cgr-engine.go @@ -559,6 +559,7 @@ func main() { utils.StatS: new(sync.WaitGroup), utils.StorDB: new(sync.WaitGroup), utils.ThresholdS: new(sync.WaitGroup), + utils.ActionS: new(sync.WaitGroup), } gvService := services.NewGlobalVarS(cfg, srvDep) shdWg.Add(1) @@ -672,6 +673,7 @@ func main() { services.NewRateService(cfg, cacheS, filterSChan, dmService, server, internalRateSChan, anz, srvDep), services.NewSIPAgent(cfg, filterSChan, shdChan, connManager, srvDep), + services.NewActionService(cfg, dmService, cacheS, filterSChan, server, internalActionSChan, anz, srvDep), ) srvManager.StartServices() // Start FilterS diff --git a/services/actions.go b/services/actions.go index ba8045e2b..78eac33db 100644 --- a/services/actions.go +++ b/services/actions.go @@ -37,7 +37,7 @@ import ( func NewActionService(cfg *config.CGRConfig, dm *DataDBService, cacheS *engine.CacheS, filterSChan chan *engine.FilterS, server *cores.Server, internalChan chan rpcclient.ClientConnector, - anz *AnalyzerService) servmanager.Service { + anz *AnalyzerService, srvDep map[string]*sync.WaitGroup) servmanager.Service { return &ActionService{ connChan: internalChan, cfg: cfg, @@ -46,6 +46,7 @@ func NewActionService(cfg *config.CGRConfig, dm *DataDBService, filterSChan: filterSChan, server: server, anz: anz, + srvDep: srvDep, } } @@ -62,6 +63,7 @@ type ActionService struct { rpc *v1.ActionSv1 // useful on restart connChan chan rpcclient.ClientConnector // publish the internal Subsystem when available anz *AnalyzerService + srvDep map[string]*sync.WaitGroup } // Start should handle the sercive start