From 699989a33629f5f967462a373854edd1865d98be Mon Sep 17 00:00:00 2001 From: gezimbll Date: Thu, 28 Mar 2024 07:35:27 -0400 Subject: [PATCH] removing cncReqs global variables --- cmd/cgr-engine/cgr-engine.go | 11 ++--------- utils/consts.go | 3 --- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/cmd/cgr-engine/cgr-engine.go b/cmd/cgr-engine/cgr-engine.go index d3b81da1d..accd58096 100644 --- a/cmd/cgr-engine/cgr-engine.go +++ b/cmd/cgr-engine/cgr-engine.go @@ -434,16 +434,9 @@ func main() { lgLevel = *logLevel } utils.Logger.SetLogLevel(lgLevel) + // init the concurrentRequests - cncReqsLimit := cfg.CoreSCfg().Caps - if utils.ConcurrentReqsLimit != 0 { // used as shared variable - cncReqsLimit = utils.ConcurrentReqsLimit - } - cncReqsStrategy := cfg.CoreSCfg().CapsStrategy - if len(utils.ConcurrentReqsStrategy) != 0 { - cncReqsStrategy = utils.ConcurrentReqsStrategy - } - caps := engine.NewCaps(cncReqsLimit, cncReqsStrategy) + caps := engine.NewCaps(cfg.CoreSCfg().Caps, cfg.CoreSCfg().CapsStrategy) utils.Logger.Info(fmt.Sprintf(" starting version <%s><%s>", vers, goVers)) // init the channel here because we need to pass them to connManager diff --git a/utils/consts.go b/utils/consts.go index b95583a2c..f3f04d0ee 100644 --- a/utils/consts.go +++ b/utils/consts.go @@ -148,9 +148,6 @@ var ( // ProtectedSFlds are the fields that sessions should not alter ProtectedSFlds = NewStringSet([]string{CGRID, OriginHost, OriginID, Usage}) - - ConcurrentReqsLimit int - ConcurrentReqsStrategy string ) const (