From 2b1fc15e9677728d27197625020170c030801073 Mon Sep 17 00:00:00 2001 From: TeoV Date: Tue, 3 Dec 2019 09:37:09 -0500 Subject: [PATCH] Remove debug logs --- engine/connmanager.go | 5 ++++- services/connmanager.go | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/connmanager.go b/engine/connmanager.go index cfcf8b05b..663fb311f 100644 --- a/engine/connmanager.go +++ b/engine/connmanager.go @@ -29,11 +29,14 @@ func NewConnManager(cfg *config.CGRConfig, rpcInternal map[string]chan rpcclient return &ConnManager{cfg: cfg, rpcInternal: rpcInternal} } +//ConnManager handle the RPC connections type ConnManager struct { cfg *config.CGRConfig rpcInternal map[string]chan rpcclient.RpcClientConnection } +//getConn is used to retrieves a connection from cache +//in case this doesn't exist create it and cache it func (cM *ConnManager) getConn(connID string) (connPool *rpcclient.RpcClientPool, err error) { //try to get the connection from cache if x, ok := Cache.Get(utils.CacheRPCConnections, connID); ok { @@ -42,7 +45,7 @@ func (cM *ConnManager) getConn(connID string) (connPool *rpcclient.RpcClientPool } return x.(*rpcclient.RpcClientPool), nil } - // in case we don't found in cache create the connection and add this in cache + // in case we don't find in cache create the connection and add this in cache var intChan chan rpcclient.RpcClientConnection var connCfg *config.RPCConn if internalChan, has := cM.rpcInternal[connID]; has { diff --git a/services/connmanager.go b/services/connmanager.go index db8311779..5c6e36152 100644 --- a/services/connmanager.go +++ b/services/connmanager.go @@ -19,7 +19,6 @@ along with this program. If not, see package services import ( - "fmt" "sync" "github.com/cgrates/cgrates/config" @@ -29,8 +28,6 @@ import ( ) func NewConnManagerService(cfg *config.CGRConfig, intConns map[string]chan rpcclient.RpcClientConnection) *ConnManagerService { - fmt.Println("Enter in NewConnManagerService") - fmt.Println(intConns) return &ConnManagerService{ cfg: cfg, connMgr: engine.NewConnManager(cfg, intConns),