mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Removed cache from multiple structs and replaced it with opts
This commit is contained in:
committed by
Dan Christian Bogos
parent
635bdd88b8
commit
83d9c67a77
@@ -28,7 +28,7 @@ func init() {
|
||||
c := &CmdSetRoute{
|
||||
name: "routes_profile_set",
|
||||
rpcMethod: utils.APIerSv1SetRouteProfile,
|
||||
rpcParams: &v1.RouteWithCache{},
|
||||
rpcParams: &v1.RouteWithOpts{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -37,7 +37,7 @@ func init() {
|
||||
type CmdSetRoute struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *v1.RouteWithCache
|
||||
rpcParams *v1.RouteWithOpts
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ func (self *CmdSetRoute) RpcMethod() string {
|
||||
|
||||
func (self *CmdSetRoute) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &v1.RouteWithCache{
|
||||
self.rpcParams = &v1.RouteWithOpts{
|
||||
RouteProfile: new(engine.RouteProfile),
|
||||
Opts: map[string]interface{}{},
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func init() {
|
||||
c := &CmdSetThreshold{
|
||||
name: "thresholds_profile_set",
|
||||
rpcMethod: utils.APIerSv1SetThresholdProfile,
|
||||
rpcParams: &engine.ThresholdWithCache{},
|
||||
rpcParams: &engine.ThresholdProfileWithOpts{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -37,7 +37,7 @@ func init() {
|
||||
type CmdSetThreshold struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.ThresholdWithCache
|
||||
rpcParams *engine.ThresholdProfileWithOpts
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ func (self *CmdSetThreshold) RpcMethod() string {
|
||||
|
||||
func (self *CmdSetThreshold) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &engine.ThresholdWithCache{
|
||||
self.rpcParams = &engine.ThresholdProfileWithOpts{
|
||||
ThresholdProfile: new(engine.ThresholdProfile),
|
||||
Opts: map[string]interface{}{},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user