Removed unused InternalTtl

This commit is contained in:
Tripon Alexandru-Ionut
2019-04-16 15:07:17 +03:00
committed by Dan Christian Bogos
parent 21c880e1da
commit bbc34b1f77
16 changed files with 38 additions and 88 deletions

View File

@@ -136,7 +136,7 @@ func startCdrc(internalCdrSChan, internalRaterChan chan rpcclient.RpcClientConne
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cdrcCfg.CdrsConns, internalCdrSChan, cfg.GeneralCfg().InternalTtl, false)
cdrcCfg.CdrsConns, internalCdrSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<CDRC> Could not connect to CDRS via RPC: %s", err.Error()))
exitChan <- true
@@ -177,7 +177,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
cfg.TlsCfg().CaCertificate, cfg.GeneralCfg().ConnectAttempts,
cfg.GeneralCfg().Reconnects, cfg.GeneralCfg().ConnectTimeout,
cfg.GeneralCfg().ReplyTimeout, cfg.SessionSCfg().ChargerSConns,
internalChargerSChan, cfg.GeneralCfg().InternalTtl, false)
internalChargerSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
utils.SessionS, utils.ChargerS, err.Error()))
@@ -193,7 +193,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
cfg.TlsCfg().CaCertificate, cfg.GeneralCfg().ConnectAttempts,
cfg.GeneralCfg().Reconnects, cfg.GeneralCfg().ConnectTimeout,
cfg.GeneralCfg().ReplyTimeout, cfg.SessionSCfg().RALsConns,
internalRaterChan, cfg.GeneralCfg().InternalTtl, false)
internalRaterChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to RALs: %s",
utils.SessionS, err.Error()))
@@ -209,8 +209,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SessionSCfg().ResSConns, internalResourceSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SessionSCfg().ResSConns, internalResourceSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to ResourceS: %s",
utils.SessionS, err.Error()))
@@ -226,8 +225,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SessionSCfg().ThreshSConns, internalThresholdSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SessionSCfg().ThreshSConns, internalThresholdSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to ThresholdS: %s",
utils.SessionS, err.Error()))
@@ -243,8 +241,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SessionSCfg().StatSConns, internalStatSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SessionSCfg().StatSConns, internalStatSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to StatS: %s",
utils.SessionS, err.Error()))
@@ -260,8 +257,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SessionSCfg().SupplSConns, internalSupplierSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SessionSCfg().SupplSConns, internalSupplierSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to SupplierS: %s",
utils.SessionS, err.Error()))
@@ -277,8 +273,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SessionSCfg().AttrSConns, internalAttrSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SessionSCfg().AttrSConns, internalAttrSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to AttributeS: %s",
utils.SessionS, err.Error()))
@@ -294,8 +289,7 @@ func startSessionS(internalSMGChan, internalRaterChan, internalResourceSChan, in
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SessionSCfg().CDRsConns, internalCDRSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SessionSCfg().CDRsConns, internalCDRSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to RALs: %s",
utils.SessionS, err.Error()))
@@ -369,8 +363,7 @@ func startAsteriskAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.AsteriskAgentCfg().SessionSConns, internalSMGChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.AsteriskAgentCfg().SessionSConns, internalSMGChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
utils.AsteriskAgent, utils.SessionS, err.Error()))
@@ -435,8 +428,7 @@ func startDiameterAgent(internalSsChan, internalDispatcherSChan chan rpcclient.R
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.DiameterAgentCfg().SessionSConns, internalSsChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.DiameterAgentCfg().SessionSConns, internalSsChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
utils.DiameterAgent, utils.SessionS, err.Error()))
@@ -484,8 +476,7 @@ func startRadiusAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.Rp
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.RadiusAgentCfg().SessionSConns, internalSMGChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.RadiusAgentCfg().SessionSConns, internalSMGChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to SMG: %s", utils.RadiusAgent, err.Error()))
exitChan <- true
@@ -538,8 +529,7 @@ func startDNSAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.RpcCl
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.DNSAgentCfg().SessionSConns, internalSMGChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.DNSAgentCfg().SessionSConns, internalSMGChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
utils.DNSAgent, utils.SessionS, err.Error()))
@@ -595,8 +585,7 @@ func startFsAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.RpcCli
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.FsAgentCfg().SessionSConns, internalSMGChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.FsAgentCfg().SessionSConns, internalSMGChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
utils.FreeSWITCHAgent, utils.SessionS, err.Error()))
@@ -648,8 +637,7 @@ func startKamAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.RpcCl
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.KamAgentCfg().SessionSConns, internalSMGChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.KamAgentCfg().SessionSConns, internalSMGChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
utils.KamailioAgent, utils.SessionS, err.Error()))
@@ -694,8 +682,7 @@ func startHTTPAgent(internalSMGChan, internalDispatcherSChan chan rpcclient.RpcC
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
agntCfg.SessionSConns, internalSMGChan,
cfg.GeneralCfg().InternalTtl, false)
agntCfg.SessionSConns, internalSMGChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> could not connect to %s, error: %s",
utils.HTTPAgent, utils.SessionS, err.Error()))
@@ -731,8 +718,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.CdrsCfg().CDRSChargerSConns, internalChargerSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.CdrsCfg().CDRSChargerSConns, internalChargerSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to %s: %s",
utils.ChargerS, err.Error()))
@@ -748,8 +734,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.CdrsCfg().CDRSRaterConns, internalRaterChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.CdrsCfg().CDRSRaterConns, internalRaterChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to RAL: %s", err.Error()))
exitChan <- true
@@ -764,8 +749,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.CdrsCfg().CDRSAttributeSConns, internalAttributeSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.CdrsCfg().CDRSAttributeSConns, internalAttributeSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to %s: %s",
utils.AttributeS, err.Error()))
@@ -781,8 +765,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.CdrsCfg().CDRSThresholdSConns, internalThresholdSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.CdrsCfg().CDRSThresholdSConns, internalThresholdSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to ThresholdS: %s", err.Error()))
exitChan <- true
@@ -797,8 +780,7 @@ func startCDRS(internalCdrSChan, internalRaterChan, internalAttributeSChan, inte
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.CdrsCfg().CDRSStatSConns, internalStatSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.CdrsCfg().CDRSStatSConns, internalStatSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<CDRS> Could not connect to StatS: %s", err.Error()))
exitChan <- true
@@ -889,8 +871,7 @@ func startChargerService(internalChargerSChan, internalAttributeSChan,
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.ChargerSCfg().AttributeSConns, internalAttributeSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.ChargerSCfg().AttributeSConns, internalAttributeSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
utils.ChargerS, utils.AttributeS, err.Error()))
@@ -941,8 +922,7 @@ func startResourceService(internalRsChan, internalThresholdSChan,
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.ResourceSCfg().ThresholdSConns, internalThresholdSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.ResourceSCfg().ThresholdSConns, internalThresholdSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<ResourceS> Could not connect to ThresholdS: %s", err.Error()))
exitChan <- true
@@ -996,8 +976,7 @@ func startStatService(internalStatSChan, internalThresholdSChan,
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.StatSCfg().ThresholdSConns, internalThresholdSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.StatSCfg().ThresholdSConns, internalThresholdSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<StatS> Could not connect to ThresholdS: %s", err.Error()))
exitChan <- true
@@ -1086,8 +1065,7 @@ func startSupplierService(internalSupplierSChan, internalRsChan, internalStatSCh
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SupplierSCfg().AttributeSConns, internalAttrSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SupplierSCfg().AttributeSConns, internalAttrSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
utils.SupplierS, utils.AttributeS, err.Error()))
@@ -1103,8 +1081,7 @@ func startSupplierService(internalSupplierSChan, internalRsChan, internalStatSCh
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SupplierSCfg().StatSConns, internalStatSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SupplierSCfg().StatSConns, internalStatSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to StatS: %s",
utils.SupplierS, err.Error()))
@@ -1120,8 +1097,7 @@ func startSupplierService(internalSupplierSChan, internalRsChan, internalStatSCh
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SupplierSCfg().ResourceSConns, internalRsChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SupplierSCfg().ResourceSConns, internalRsChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to StatS: %s",
utils.SupplierS, err.Error()))
@@ -1202,8 +1178,7 @@ func startDispatcherService(internalDispatcherSChan, internalAttributeSChan chan
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.DispatcherSCfg().AttributeSConns, internalAttributeSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.DispatcherSCfg().AttributeSConns, internalAttributeSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to %s: %s",
utils.DispatcherS, utils.AttributeS, err.Error()))
@@ -1465,8 +1440,7 @@ func schedCDRsConns(internalCDRSChan, internalDispatcherSChan chan rpcclient.Rpc
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.SchedulerCfg().CDRsConns, internalCDRSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.SchedulerCfg().CDRsConns, internalCDRSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<%s> Could not connect to CDRServer: %s", utils.SchedulerS, err.Error()))
exitChan <- true

View File

@@ -77,8 +77,7 @@ func startRater(internalRaterChan, internalApierv1, internalApierv2, internalThd
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.RalsCfg().RALsThresholdSConns, internalThdSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.RalsCfg().RALsThresholdSConns, internalThdSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<RALs> Could not connect to ThresholdS, error: %s", err.Error()))
exitChan <- true
@@ -101,8 +100,7 @@ func startRater(internalRaterChan, internalApierv1, internalApierv2, internalThd
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.RalsCfg().RALsStatSConns, internalStatSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.RalsCfg().RALsStatSConns, internalStatSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<RALs> Could not connect to StatS, error: %s", err.Error()))
exitChan <- true
@@ -126,8 +124,7 @@ func startRater(internalRaterChan, internalApierv1, internalApierv2, internalThd
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.ApierCfg().CachesConns, internalCacheSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.ApierCfg().CachesConns, internalCacheSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<APIer> Could not connect to CacheS, error: %s", err.Error()))
exitChan <- true
@@ -151,8 +148,7 @@ func startRater(internalRaterChan, internalApierv1, internalApierv2, internalThd
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
cfg.GeneralCfg().ConnectTimeout, cfg.GeneralCfg().ReplyTimeout,
cfg.ApierCfg().SchedulerConns, internalSchedulerSChan,
cfg.GeneralCfg().InternalTtl, false)
cfg.ApierCfg().SchedulerConns, internalSchedulerSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<APIer> Could not connect to SchedulerS, error: %s", err.Error()))
exitChan <- true

View File

@@ -46,7 +46,6 @@ const CGRATES_CFG_JSON = `
"reconnects": -1, // number of retries in case of connection lost
"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
"internal_ttl": "5s", // maximum duration to wait for internal connections before giving up
"locking_timeout": "0", // timeout internal locks to avoid deadlocks
"digest_separator": ",", // separator to use in replies containing data digests
"digest_equal": ":", // equal symbol used in case of digests

View File

@@ -56,7 +56,6 @@ func TestDfGeneralJsonCfg(t *testing.T) {
Reconnects: utils.IntPointer(-1),
Connect_timeout: utils.StringPointer("1s"),
Reply_timeout: utils.StringPointer("2s"),
Internal_ttl: utils.StringPointer("5s"),
Locking_timeout: utils.StringPointer("0"),
Digest_separator: utils.StringPointer(","),
Digest_equal: utils.StringPointer(":"),

View File

@@ -364,9 +364,6 @@ func TestCgrCfgJSONDefaultsGeneral(t *testing.T) {
if cgrCfg.GeneralCfg().ReplyTimeout != 2*time.Second {
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 {
t.Errorf("Expected: 0, received: %+v", cgrCfg.GeneralCfg().LockingTimeout)
}

View File

@@ -45,7 +45,6 @@ type GeneralCfg struct {
Reconnects int // number of recconect attempts in case of connection lost <-1 for infinite | nb>
ConnectTimeout time.Duration // timeout for RPC connection attempts
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
DigestSeparator string //
DigestEqual string //
@@ -116,11 +115,6 @@ func (gencfg *GeneralCfg) loadFromJsonCfg(jsnGeneralCfg *GeneralJsonCfg) (err er
if jsnGeneralCfg.Default_caching != nil {
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 gencfg.LockingTimeout, err = utils.ParseDurationWithNanosecs(*jsnGeneralCfg.Locking_timeout); err != nil {
return err

View File

@@ -56,7 +56,6 @@ func TestGeneralCfgloadFromJsonCfg(t *testing.T) {
"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
"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
"digest_separator": ",",
"digest_equal": ":",
@@ -80,8 +79,6 @@ func TestGeneralCfgloadFromJsonCfg(t *testing.T) {
Reconnects: -1,
ConnectTimeout: time.Duration(1 * time.Second),
ReplyTimeout: time.Duration(2 * time.Second),
InternalTtl: time.Duration(2 * time.Minute),
LockingTimeout: time.Duration(0),
DigestSeparator: ",",
DigestEqual: ":",
}

View File

@@ -38,7 +38,6 @@ type GeneralJsonCfg struct {
Reconnects *int
Connect_timeout *string
Reply_timeout *string
Internal_ttl *string
Locking_timeout *string
Digest_separator *string
Digest_equal *string

View File

@@ -117,7 +117,6 @@ func TestMfEnvReaderITRead(t *testing.T) {
Reconnects: -1,
ConnectTimeout: time.Duration(1 * time.Second),
ReplyTimeout: time.Duration(2 * time.Second),
InternalTtl: time.Duration(2 * time.Minute),
LockingTimeout: time.Duration(0),
DigestSeparator: ",",
DigestEqual: ":",

View File

@@ -24,7 +24,6 @@
// "reconnects": -1, // number of retries in case of connection lost
// "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
// "internal_ttl": "5s", // maximum duration to wait for internal connections before giving up
// "locking_timeout": "0", // timeout internal locks to avoid deadlocks
// "digest_separator": ",", // separator to use in replies containing data digests
// "digest_equal": ":", // equal symbol used in case of digests

View File

@@ -5,7 +5,6 @@
// Starts rater, scheduler
"general": {
"internal_ttl": "30m",
},
"listen": {

View File

@@ -20,7 +20,6 @@
"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
"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
"digest_separator": ",",
"digest_equal": ":",

View File

@@ -1334,7 +1334,7 @@ func (dm *DataManager) GetDispatcherHost(tenant, id string, cacheRead, cacheWrit
cfg.TlsCfg().ClientCerificate, cfg.TlsCfg().CaCertificate,
cfg.GeneralCfg().ConnectAttempts, cfg.GeneralCfg().Reconnects,
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
}
Cache.Set(utils.CacheDispatcherHosts, tntID, dH, nil,

View File

@@ -95,7 +95,7 @@ func (fS *FilterS) connStatS(statSChan chan rpcclient.RpcClientConnection) (err
fS.cfg.TlsCfg().CaCertificate, fS.cfg.GeneralCfg().ConnectAttempts,
fS.cfg.GeneralCfg().Reconnects, fS.cfg.GeneralCfg().ConnectTimeout,
fS.cfg.GeneralCfg().ReplyTimeout, fS.cfg.FilterSCfg().StatSConns,
statSChan, fS.cfg.GeneralCfg().InternalTtl, true)
statSChan, true)
return
}
@@ -111,7 +111,7 @@ func (fS *FilterS) connResourceS(resSChan chan rpcclient.RpcClientConnection) (e
fS.cfg.TlsCfg().CaCertificate, fS.cfg.GeneralCfg().ConnectAttempts,
fS.cfg.GeneralCfg().Reconnects, fS.cfg.GeneralCfg().ConnectTimeout,
fS.cfg.GeneralCfg().ReplyTimeout, fS.cfg.FilterSCfg().ResourceSConns,
resSChan, fS.cfg.GeneralCfg().InternalTtl, true)
resSChan, true)
return
}

View File

@@ -30,7 +30,7 @@ import (
func NewRPCPool(dispatchStrategy string, keyPath, certPath, caPath string, connAttempts, reconnects int,
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 err error
rpcPool := rpcclient.NewRpcClientPool(dispatchStrategy, replyTimeout)

View File

@@ -82,8 +82,7 @@ func NewLoader(dm *engine.DataManager, cfg *config.LoaderSCfg,
config.CgrConfig().TlsCfg().ClientCerificate, config.CgrConfig().TlsCfg().CaCertificate,
config.CgrConfig().GeneralCfg().ConnectAttempts, config.CgrConfig().GeneralCfg().Reconnects,
config.CgrConfig().GeneralCfg().ConnectTimeout, config.CgrConfig().GeneralCfg().ReplyTimeout,
cfg.CacheSConns, internalCacheSChan,
config.CgrConfig().GeneralCfg().InternalTtl, false)
cfg.CacheSConns, internalCacheSChan, false)
if err != nil {
utils.Logger.Crit(fmt.Sprintf("<LoaderS> Could not connect to CacheS, error: %s", err.Error()))
exitChan <- true