mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Removed unused InternalTtl
This commit is contained in:
committed by
Dan Christian Bogos
parent
21c880e1da
commit
bbc34b1f77
@@ -136,7 +136,7 @@ func startCdrc(internalCdrSChan, internalRaterChan chan rpcclient.RpcClientConne
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cdrcCfg.CdrsConns, internalCdrSChan, cfg.GeneralCfg().InternalTtl, false)
|
cdrcCfg.CdrsConns, internalCdrSChan, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<CDRC> Could not connect to CDRS via RPC: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<CDRC> Could not connect to CDRS via RPC: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -177,7 +177,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
|
|||||||
cfg.TlsCfg().CaCertificate, cfg.GeneralCfg().ConnectAttempts,
|
cfg.TlsCfg().CaCertificate, cfg.GeneralCfg().ConnectAttempts,
|
||||||
cfg.GeneralCfg().Reconnects, cfg.GeneralCfg().ConnectTimeout,
|
cfg.GeneralCfg().Reconnects, cfg.GeneralCfg().ConnectTimeout,
|
||||||
cfg.GeneralCfg().ReplyTimeout, cfg.SessionSCfg().ChargerSConns,
|
cfg.GeneralCfg().ReplyTimeout, cfg.SessionSCfg().ChargerSConns,
|
||||||
internalChargerSChan, cfg.GeneralCfg().InternalTtl, false)
|
internalChargerSChan, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
||||||
utils.SessionS, utils.ChargerS, err.Error()))
|
utils.SessionS, utils.ChargerS, err.Error()))
|
||||||
@@ -193,7 +193,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
|
|||||||
cfg.TlsCfg().CaCertificate, cfg.GeneralCfg().ConnectAttempts,
|
cfg.TlsCfg().CaCertificate, cfg.GeneralCfg().ConnectAttempts,
|
||||||
cfg.GeneralCfg().Reconnects, cfg.GeneralCfg().ConnectTimeout,
|
cfg.GeneralCfg().Reconnects, cfg.GeneralCfg().ConnectTimeout,
|
||||||
cfg.GeneralCfg().ReplyTimeout, cfg.SessionSCfg().RALsConns,
|
cfg.GeneralCfg().ReplyTimeout, cfg.SessionSCfg().RALsConns,
|
||||||
internalRaterChan, cfg.GeneralCfg().InternalTtl, false)
|
internalRaterChan, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to RALs: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to RALs: %s",
|
||||||
utils.SessionS, err.Error()))
|
utils.SessionS, err.Error()))
|
||||||
@@ -209,8 +209,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SessionSCfg().ResSConns, internalResourceSChan,
|
cfg.SessionSCfg().ResSConns, internalResourceSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to ResourceS: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to ResourceS: %s",
|
||||||
utils.SessionS, err.Error()))
|
utils.SessionS, err.Error()))
|
||||||
@@ -226,8 +225,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SessionSCfg().ThreshSConns, internalThresholdSChan,
|
cfg.SessionSCfg().ThreshSConns, internalThresholdSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to ThresholdS: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to ThresholdS: %s",
|
||||||
utils.SessionS, err.Error()))
|
utils.SessionS, err.Error()))
|
||||||
@@ -243,8 +241,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SessionSCfg().StatSConns, internalStatSChan,
|
cfg.SessionSCfg().StatSConns, internalStatSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to StatS: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to StatS: %s",
|
||||||
utils.SessionS, err.Error()))
|
utils.SessionS, err.Error()))
|
||||||
@@ -260,8 +257,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SessionSCfg().SupplSConns, internalSupplierSChan,
|
cfg.SessionSCfg().SupplSConns, internalSupplierSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to SupplierS: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to SupplierS: %s",
|
||||||
utils.SessionS, err.Error()))
|
utils.SessionS, err.Error()))
|
||||||
@@ -277,8 +273,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SessionSCfg().AttrSConns, internalAttrSChan,
|
cfg.SessionSCfg().AttrSConns, internalAttrSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to AttributeS: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to AttributeS: %s",
|
||||||
utils.SessionS, err.Error()))
|
utils.SessionS, err.Error()))
|
||||||
@@ -294,8 +289,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SessionSCfg().CDRsConns, internalCDRSChan,
|
cfg.SessionSCfg().CDRsConns, internalCDRSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to RALs: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to RALs: %s",
|
||||||
utils.SessionS, err.Error()))
|
utils.SessionS, err.Error()))
|
||||||
@@ -369,8 +363,7 @@ func startAsteriskAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.AsteriskAgentCfg().SessionSConns, internalSMGChan,
|
cfg.AsteriskAgentCfg().SessionSConns, internalSMGChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
||||||
utils.AsteriskAgent, utils.SessionS, err.Error()))
|
utils.AsteriskAgent, utils.SessionS, err.Error()))
|
||||||
@@ -435,8 +428,7 @@ func startDiameterAgent(internalSsChan, internalDispatcherSChan chan rpcclient.R
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.DiameterAgentCfg().SessionSConns, internalSsChan,
|
cfg.DiameterAgentCfg().SessionSConns, internalSsChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
||||||
utils.DiameterAgent, utils.SessionS, err.Error()))
|
utils.DiameterAgent, utils.SessionS, err.Error()))
|
||||||
@@ -484,8 +476,7 @@ func startRadiusAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.Rp
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.RadiusAgentCfg().SessionSConns, internalSMGChan,
|
cfg.RadiusAgentCfg().SessionSConns, internalSMGChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to SMG: %s", utils.RadiusAgent, err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to SMG: %s", utils.RadiusAgent, err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -538,8 +529,7 @@ func startDNSAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.RpcCl
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.DNSAgentCfg().SessionSConns, internalSMGChan,
|
cfg.DNSAgentCfg().SessionSConns, internalSMGChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
||||||
utils.DNSAgent, utils.SessionS, err.Error()))
|
utils.DNSAgent, utils.SessionS, err.Error()))
|
||||||
@@ -595,8 +585,7 @@ func startFsAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.RpcCli
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.FsAgentCfg().SessionSConns, internalSMGChan,
|
cfg.FsAgentCfg().SessionSConns, internalSMGChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
||||||
utils.FreeSWITCHAgent, utils.SessionS, err.Error()))
|
utils.FreeSWITCHAgent, utils.SessionS, err.Error()))
|
||||||
@@ -648,8 +637,7 @@ func startKamAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.RpcCl
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.KamAgentCfg().SessionSConns, internalSMGChan,
|
cfg.KamAgentCfg().SessionSConns, internalSMGChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
||||||
utils.KamailioAgent, utils.SessionS, err.Error()))
|
utils.KamailioAgent, utils.SessionS, err.Error()))
|
||||||
@@ -694,8 +682,7 @@ func startHTTPAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.RpcC
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
agntCfg.SessionSConns, internalSMGChan,
|
agntCfg.SessionSConns, internalSMGChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> could not connect to %s, error: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> could not connect to %s, error: %s",
|
||||||
utils.HTTPAgent, utils.SessionS, err.Error()))
|
utils.HTTPAgent, utils.SessionS, err.Error()))
|
||||||
@@ -731,8 +718,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.CdrsCfg().CDRSChargerSConns, internalChargerSChan,
|
cfg.CdrsCfg().CDRSChargerSConns, internalChargerSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to %s: %s",
|
||||||
utils.ChargerS, err.Error()))
|
utils.ChargerS, err.Error()))
|
||||||
@@ -748,8 +734,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.CdrsCfg().CDRSRaterConns, internalRaterChan,
|
cfg.CdrsCfg().CDRSRaterConns, internalRaterChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to RAL: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to RAL: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -764,8 +749,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.CdrsCfg().CDRSAttributeSConns, internalAttributeSChan,
|
cfg.CdrsCfg().CDRSAttributeSConns, internalAttributeSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to %s: %s",
|
||||||
utils.AttributeS, err.Error()))
|
utils.AttributeS, err.Error()))
|
||||||
@@ -781,8 +765,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.CdrsCfg().CDRSThresholdSConns, internalThresholdSChan,
|
cfg.CdrsCfg().CDRSThresholdSConns, internalThresholdSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to ThresholdS: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to ThresholdS: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -797,8 +780,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.CdrsCfg().CDRSStatSConns, internalStatSChan,
|
cfg.CdrsCfg().CDRSStatSConns, internalStatSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to StatS: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to StatS: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -889,8 +871,7 @@ func startChargerService(internalChargerSChan, internalAttributeSChan,
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.ChargerSCfg().AttributeSConns, internalAttributeSChan,
|
cfg.ChargerSCfg().AttributeSConns, internalAttributeSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
||||||
utils.ChargerS, utils.AttributeS, err.Error()))
|
utils.ChargerS, utils.AttributeS, err.Error()))
|
||||||
@@ -941,8 +922,7 @@ func startResourceService(internalRsChan, internalThresholdSChan,
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.ResourceSCfg().ThresholdSConns, internalThresholdSChan,
|
cfg.ResourceSCfg().ThresholdSConns, internalThresholdSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<ResourceS> Could not connect to ThresholdS: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<ResourceS> Could not connect to ThresholdS: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -996,8 +976,7 @@ func startStatService(internalStatSChan, internalThresholdSChan,
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.StatSCfg().ThresholdSConns, internalThresholdSChan,
|
cfg.StatSCfg().ThresholdSConns, internalThresholdSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<StatS> Could not connect to ThresholdS: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<StatS> Could not connect to ThresholdS: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -1086,8 +1065,7 @@ func startSupplierService(internalSupplierSChan, internalRsChan, internalStatSCh
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SupplierSCfg().AttributeSConns, internalAttrSChan,
|
cfg.SupplierSCfg().AttributeSConns, internalAttrSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
||||||
utils.SupplierS, utils.AttributeS, err.Error()))
|
utils.SupplierS, utils.AttributeS, err.Error()))
|
||||||
@@ -1103,8 +1081,7 @@ func startSupplierService(internalSupplierSChan, internalRsChan, internalStatSCh
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SupplierSCfg().StatSConns, internalStatSChan,
|
cfg.SupplierSCfg().StatSConns, internalStatSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to StatS: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to StatS: %s",
|
||||||
utils.SupplierS, err.Error()))
|
utils.SupplierS, err.Error()))
|
||||||
@@ -1120,8 +1097,7 @@ func startSupplierService(internalSupplierSChan, internalRsChan, internalStatSCh
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SupplierSCfg().ResourceSConns, internalRsChan,
|
cfg.SupplierSCfg().ResourceSConns, internalRsChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to StatS: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to StatS: %s",
|
||||||
utils.SupplierS, err.Error()))
|
utils.SupplierS, err.Error()))
|
||||||
@@ -1202,8 +1178,7 @@ func startDispatcherService(internalDispatcherSChan, internalAttributeSChan chan
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.DispatcherSCfg().AttributeSConns, internalAttributeSChan,
|
cfg.DispatcherSCfg().AttributeSConns, internalAttributeSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
|
||||||
utils.DispatcherS, utils.AttributeS, err.Error()))
|
utils.DispatcherS, utils.AttributeS, err.Error()))
|
||||||
@@ -1465,8 +1440,7 @@ func schedCDRsConns(internalCDRSChan, internalDispatcherSChan chan rpcclient.Rpc
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.SchedulerCfg().CDRsConns, internalCDRSChan,
|
cfg.SchedulerCfg().CDRsConns, internalCDRSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to CDRServer: %s", utils.SchedulerS, err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to CDRServer: %s", utils.SchedulerS, err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
|
|||||||
@@ -77,8 +77,7 @@ func startRater(internalRaterChan, internalApierv1, internalApierv2, internalThd
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.RalsCfg().RALsThresholdSConns, internalThdSChan,
|
cfg.RalsCfg().RALsThresholdSConns, internalThdSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<RALs> Could not connect to ThresholdS, error: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<RALs> Could not connect to ThresholdS, error: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -101,8 +100,7 @@ func startRater(internalRaterChan, internalApierv1, internalApierv2, internalThd
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.RalsCfg().RALsStatSConns, internalStatSChan,
|
cfg.RalsCfg().RALsStatSConns, internalStatSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<RALs> Could not connect to StatS, error: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<RALs> Could not connect to StatS, error: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -126,8 +124,7 @@ func startRater(internalRaterChan, internalApierv1, internalApierv2, internalThd
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.ApierCfg().CachesConns, internalCacheSChan,
|
cfg.ApierCfg().CachesConns, internalCacheSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<APIer> Could not connect to CacheS, error: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<APIer> Could not connect to CacheS, error: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
@@ -151,8 +148,7 @@ func startRater(internalRaterChan, internalApierv1, internalApierv2, internalThd
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
cfg.ApierCfg().SchedulerConns, internalSchedulerSChan,
|
cfg.ApierCfg().SchedulerConns, internalSchedulerSChan, false)
|
||||||
cfg.GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<APIer> Could not connect to SchedulerS, error: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<APIer> Could not connect to SchedulerS, error: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ const CGRATES_CFG_JSON = `
|
|||||||
"reconnects": -1, // number of retries in case of connection lost
|
"reconnects": -1, // number of retries in case of connection lost
|
||||||
"connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
"connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
||||||
"reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
"reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
||||||
"internal_ttl": "5s", // maximum duration to wait for internal connections before giving up
|
|
||||||
"locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
"locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
||||||
"digest_separator": ",", // separator to use in replies containing data digests
|
"digest_separator": ",", // separator to use in replies containing data digests
|
||||||
"digest_equal": ":", // equal symbol used in case of digests
|
"digest_equal": ":", // equal symbol used in case of digests
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ func TestDfGeneralJsonCfg(t *testing.T) {
|
|||||||
Reconnects: utils.IntPointer(-1),
|
Reconnects: utils.IntPointer(-1),
|
||||||
Connect_timeout: utils.StringPointer("1s"),
|
Connect_timeout: utils.StringPointer("1s"),
|
||||||
Reply_timeout: utils.StringPointer("2s"),
|
Reply_timeout: utils.StringPointer("2s"),
|
||||||
Internal_ttl: utils.StringPointer("5s"),
|
|
||||||
Locking_timeout: utils.StringPointer("0"),
|
Locking_timeout: utils.StringPointer("0"),
|
||||||
Digest_separator: utils.StringPointer(","),
|
Digest_separator: utils.StringPointer(","),
|
||||||
Digest_equal: utils.StringPointer(":"),
|
Digest_equal: utils.StringPointer(":"),
|
||||||
|
|||||||
@@ -364,9 +364,6 @@ func TestCgrCfgJSONDefaultsGeneral(t *testing.T) {
|
|||||||
if cgrCfg.GeneralCfg().ReplyTimeout != 2*time.Second {
|
if cgrCfg.GeneralCfg().ReplyTimeout != 2*time.Second {
|
||||||
t.Errorf("Expected: 2s, received: %+v", cgrCfg.GeneralCfg().ReplyTimeout)
|
t.Errorf("Expected: 2s, received: %+v", cgrCfg.GeneralCfg().ReplyTimeout)
|
||||||
}
|
}
|
||||||
if cgrCfg.GeneralCfg().InternalTtl != 5*time.Second {
|
|
||||||
t.Errorf("Expected: 2m, received: %+v", cgrCfg.GeneralCfg().InternalTtl)
|
|
||||||
}
|
|
||||||
if cgrCfg.GeneralCfg().LockingTimeout != 0 {
|
if cgrCfg.GeneralCfg().LockingTimeout != 0 {
|
||||||
t.Errorf("Expected: 0, received: %+v", cgrCfg.GeneralCfg().LockingTimeout)
|
t.Errorf("Expected: 0, received: %+v", cgrCfg.GeneralCfg().LockingTimeout)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ type GeneralCfg struct {
|
|||||||
Reconnects int // number of recconect attempts in case of connection lost <-1 for infinite | nb>
|
Reconnects int // number of recconect attempts in case of connection lost <-1 for infinite | nb>
|
||||||
ConnectTimeout time.Duration // timeout for RPC connection attempts
|
ConnectTimeout time.Duration // timeout for RPC connection attempts
|
||||||
ReplyTimeout time.Duration // timeout replies if not reaching back
|
ReplyTimeout time.Duration // timeout replies if not reaching back
|
||||||
InternalTtl time.Duration // maximum duration to wait for internal connections before giving up
|
|
||||||
LockingTimeout time.Duration // locking mechanism timeout to avoid deadlocks
|
LockingTimeout time.Duration // locking mechanism timeout to avoid deadlocks
|
||||||
DigestSeparator string //
|
DigestSeparator string //
|
||||||
DigestEqual string //
|
DigestEqual string //
|
||||||
@@ -116,11 +115,6 @@ func (gencfg *GeneralCfg) loadFromJsonCfg(jsnGeneralCfg *GeneralJsonCfg) (err er
|
|||||||
if jsnGeneralCfg.Default_caching != nil {
|
if jsnGeneralCfg.Default_caching != nil {
|
||||||
gencfg.DefaultCaching = *jsnGeneralCfg.Default_caching
|
gencfg.DefaultCaching = *jsnGeneralCfg.Default_caching
|
||||||
}
|
}
|
||||||
if jsnGeneralCfg.Internal_ttl != nil {
|
|
||||||
if gencfg.InternalTtl, err = utils.ParseDurationWithNanosecs(*jsnGeneralCfg.Internal_ttl); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if jsnGeneralCfg.Locking_timeout != nil {
|
if jsnGeneralCfg.Locking_timeout != nil {
|
||||||
if gencfg.LockingTimeout, err = utils.ParseDurationWithNanosecs(*jsnGeneralCfg.Locking_timeout); err != nil {
|
if gencfg.LockingTimeout, err = utils.ParseDurationWithNanosecs(*jsnGeneralCfg.Locking_timeout); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ func TestGeneralCfgloadFromJsonCfg(t *testing.T) {
|
|||||||
"connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
"connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
||||||
"reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
"reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
||||||
"response_cache_ttl": "0s", // the life span of a cached response
|
"response_cache_ttl": "0s", // the life span of a cached response
|
||||||
"internal_ttl": "2m", // maximum duration to wait for internal connections before giving up
|
|
||||||
"locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
"locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
||||||
"digest_separator": ",",
|
"digest_separator": ",",
|
||||||
"digest_equal": ":",
|
"digest_equal": ":",
|
||||||
@@ -80,8 +79,6 @@ func TestGeneralCfgloadFromJsonCfg(t *testing.T) {
|
|||||||
Reconnects: -1,
|
Reconnects: -1,
|
||||||
ConnectTimeout: time.Duration(1 * time.Second),
|
ConnectTimeout: time.Duration(1 * time.Second),
|
||||||
ReplyTimeout: time.Duration(2 * time.Second),
|
ReplyTimeout: time.Duration(2 * time.Second),
|
||||||
InternalTtl: time.Duration(2 * time.Minute),
|
|
||||||
LockingTimeout: time.Duration(0),
|
|
||||||
DigestSeparator: ",",
|
DigestSeparator: ",",
|
||||||
DigestEqual: ":",
|
DigestEqual: ":",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ type GeneralJsonCfg struct {
|
|||||||
Reconnects *int
|
Reconnects *int
|
||||||
Connect_timeout *string
|
Connect_timeout *string
|
||||||
Reply_timeout *string
|
Reply_timeout *string
|
||||||
Internal_ttl *string
|
|
||||||
Locking_timeout *string
|
Locking_timeout *string
|
||||||
Digest_separator *string
|
Digest_separator *string
|
||||||
Digest_equal *string
|
Digest_equal *string
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ func TestMfEnvReaderITRead(t *testing.T) {
|
|||||||
Reconnects: -1,
|
Reconnects: -1,
|
||||||
ConnectTimeout: time.Duration(1 * time.Second),
|
ConnectTimeout: time.Duration(1 * time.Second),
|
||||||
ReplyTimeout: time.Duration(2 * time.Second),
|
ReplyTimeout: time.Duration(2 * time.Second),
|
||||||
InternalTtl: time.Duration(2 * time.Minute),
|
|
||||||
LockingTimeout: time.Duration(0),
|
LockingTimeout: time.Duration(0),
|
||||||
DigestSeparator: ",",
|
DigestSeparator: ",",
|
||||||
DigestEqual: ":",
|
DigestEqual: ":",
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
// "reconnects": -1, // number of retries in case of connection lost
|
// "reconnects": -1, // number of retries in case of connection lost
|
||||||
// "connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
// "connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
||||||
// "reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
// "reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
||||||
// "internal_ttl": "5s", // maximum duration to wait for internal connections before giving up
|
|
||||||
// "locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
// "locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
||||||
// "digest_separator": ",", // separator to use in replies containing data digests
|
// "digest_separator": ",", // separator to use in replies containing data digests
|
||||||
// "digest_equal": ":", // equal symbol used in case of digests
|
// "digest_equal": ":", // equal symbol used in case of digests
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
// Starts rater, scheduler
|
// Starts rater, scheduler
|
||||||
|
|
||||||
"general": {
|
"general": {
|
||||||
"internal_ttl": "30m",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"listen": {
|
"listen": {
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
"connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
"connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
||||||
"reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
"reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
||||||
"response_cache_ttl": "0s", // the life span of a cached response
|
"response_cache_ttl": "0s", // the life span of a cached response
|
||||||
"internal_ttl": "2m", // maximum duration to wait for internal connections before giving up
|
|
||||||
"locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
"locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
||||||
"digest_separator": ",",
|
"digest_separator": ",",
|
||||||
"digest_equal": ":",
|
"digest_equal": ":",
|
||||||
|
|||||||
@@ -1334,7 +1334,7 @@ func (dm *DataManager) GetDispatcherHost(tenant, id string, cacheRead, cacheWrit
|
|||||||
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
|
||||||
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
|
||||||
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
|
||||||
dH.Conns, IntRPC.GetInternalChanel(), cfg.GeneralCfg().InternalTtl, false); err != nil {
|
dH.Conns, IntRPC.GetInternalChanel(), false); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
Cache.Set(utils.CacheDispatcherHosts, tntID, dH, nil,
|
Cache.Set(utils.CacheDispatcherHosts, tntID, dH, nil,
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ func (fS *FilterS) connStatS(statSChan chan rpcclient.RpcClientConnection) (err
|
|||||||
fS.cfg.TlsCfg().CaCertificate, fS.cfg.GeneralCfg().ConnectAttempts,
|
fS.cfg.TlsCfg().CaCertificate, fS.cfg.GeneralCfg().ConnectAttempts,
|
||||||
fS.cfg.GeneralCfg().Reconnects, fS.cfg.GeneralCfg().ConnectTimeout,
|
fS.cfg.GeneralCfg().Reconnects, fS.cfg.GeneralCfg().ConnectTimeout,
|
||||||
fS.cfg.GeneralCfg().ReplyTimeout, fS.cfg.FilterSCfg().StatSConns,
|
fS.cfg.GeneralCfg().ReplyTimeout, fS.cfg.FilterSCfg().StatSConns,
|
||||||
statSChan, fS.cfg.GeneralCfg().InternalTtl, true)
|
statSChan, true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ func (fS *FilterS) connResourceS(resSChan chan rpcclient.RpcClientConnection) (e
|
|||||||
fS.cfg.TlsCfg().CaCertificate, fS.cfg.GeneralCfg().ConnectAttempts,
|
fS.cfg.TlsCfg().CaCertificate, fS.cfg.GeneralCfg().ConnectAttempts,
|
||||||
fS.cfg.GeneralCfg().Reconnects, fS.cfg.GeneralCfg().ConnectTimeout,
|
fS.cfg.GeneralCfg().Reconnects, fS.cfg.GeneralCfg().ConnectTimeout,
|
||||||
fS.cfg.GeneralCfg().ReplyTimeout, fS.cfg.FilterSCfg().ResourceSConns,
|
fS.cfg.GeneralCfg().ReplyTimeout, fS.cfg.FilterSCfg().ResourceSConns,
|
||||||
resSChan, fS.cfg.GeneralCfg().InternalTtl, true)
|
resSChan, true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import (
|
|||||||
|
|
||||||
func NewRPCPool(dispatchStrategy string, keyPath, certPath, caPath string, connAttempts, reconnects int,
|
func NewRPCPool(dispatchStrategy string, keyPath, certPath, caPath string, connAttempts, reconnects int,
|
||||||
connectTimeout, replyTimeout time.Duration, rpcConnCfgs []*config.RemoteHost,
|
connectTimeout, replyTimeout time.Duration, rpcConnCfgs []*config.RemoteHost,
|
||||||
internalConnChan chan rpcclient.RpcClientConnection, ttl time.Duration, lazyConnect bool) (*rpcclient.RpcClientPool, error) {
|
internalConnChan chan rpcclient.RpcClientConnection, lazyConnect bool) (*rpcclient.RpcClientPool, error) {
|
||||||
var rpcClient *rpcclient.RpcClient
|
var rpcClient *rpcclient.RpcClient
|
||||||
var err error
|
var err error
|
||||||
rpcPool := rpcclient.NewRpcClientPool(dispatchStrategy, replyTimeout)
|
rpcPool := rpcclient.NewRpcClientPool(dispatchStrategy, replyTimeout)
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ func NewLoader(dm *engine.DataManager, cfg *config.LoaderSCfg,
|
|||||||
config.CgrConfig().TlsCfg().ClientCerificate, config.CgrConfig().TlsCfg().CaCertificate,
|
config.CgrConfig().TlsCfg().ClientCerificate, config.CgrConfig().TlsCfg().CaCertificate,
|
||||||
config.CgrConfig().GeneralCfg().ConnectAttempts, config.CgrConfig().GeneralCfg().Reconnects,
|
config.CgrConfig().GeneralCfg().ConnectAttempts, config.CgrConfig().GeneralCfg().Reconnects,
|
||||||
config.CgrConfig().GeneralCfg().ConnectTimeout, config.CgrConfig().GeneralCfg().ReplyTimeout,
|
config.CgrConfig().GeneralCfg().ConnectTimeout, config.CgrConfig().GeneralCfg().ReplyTimeout,
|
||||||
cfg.CacheSConns, internalCacheSChan,
|
cfg.CacheSConns, internalCacheSChan, false)
|
||||||
config.CgrConfig().GeneralCfg().InternalTtl, false)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Crit(fmt.Sprintf("<LoaderS> Could not connect to CacheS, error: %s", err.Error()))
|
utils.Logger.Crit(fmt.Sprintf("<LoaderS> Could not connect to CacheS, error: %s", err.Error()))
|
||||||
exitChan <- true
|
exitChan <- true
|
||||||
|
|||||||
Reference in New Issue
Block a user