mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Changed cache verification replication/remote
This commit is contained in:
@@ -455,13 +455,16 @@ func callDH(dh *engine.DispatcherHost, routeID string, dR *DispatcherRoute,
|
||||
Value: dR,
|
||||
GroupIDs: []string{utils.ConcatenatedKey(utils.CacheDispatcherProfiles, dR.Tenant, dR.ProfileID)},
|
||||
}
|
||||
if err = engine.Cache.SetWithReplicate(argsCache); err != nil {
|
||||
if !rpcclient.IsNetworkError(err) {
|
||||
return
|
||||
if len(config.CgrConfig().CacheCfg().ReplicationConns) != 0 &&
|
||||
config.CgrConfig().CacheCfg().Partitions[utils.CacheDispatcherRoutes].Replicate {
|
||||
if err = engine.Cache.SetWithReplicate(argsCache); err != nil {
|
||||
if !rpcclient.IsNetworkError(err) {
|
||||
return
|
||||
}
|
||||
// did not dispatch properly, fail-back to standard dispatching
|
||||
utils.Logger.Warning(fmt.Sprintf("<%s> ignoring cache network error <%s> setting route dR %+v",
|
||||
utils.DispatcherS, err.Error(), dR))
|
||||
}
|
||||
// did not dispatch properly, fail-back to standard dispatching
|
||||
utils.Logger.Warning(fmt.Sprintf("<%s> ignoring cache network error <%s> setting route dR %+v",
|
||||
utils.DispatcherS, err.Error(), dR))
|
||||
}
|
||||
}
|
||||
if err = dh.Call(method, args, reply); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user