mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 08:38:45 +05:00
Context for routes methods
This commit is contained in:
committed by
Dan Christian Bogos
parent
8584e77b78
commit
7950cc8a7d
@@ -1268,7 +1268,7 @@ func (dm *DataManager) SetRouteProfile(ctx *context.Context, rpp *RouteProfile,
|
||||
return
|
||||
}
|
||||
|
||||
func (dm *DataManager) RemoveRouteProfile(tenant, id string, withIndex bool) (err error) {
|
||||
func (dm *DataManager) RemoveRouteProfile(ctx *context.Context, tenant, id string, withIndex bool) (err error) {
|
||||
if dm == nil {
|
||||
return utils.ErrNoDatabaseConn
|
||||
}
|
||||
|
||||
@@ -757,7 +757,7 @@ func (tpr *TpReader) RemoveFromDatabase(verbose, disableReverse bool) (err error
|
||||
log.Print("RouteProfiles:")
|
||||
}
|
||||
for _, tpSpl := range tpr.routeProfiles {
|
||||
if err = tpr.dm.RemoveRouteProfile(tpSpl.Tenant, tpSpl.ID, true); err != nil {
|
||||
if err = tpr.dm.RemoveRouteProfile(context.TODO(), tpSpl.Tenant, tpSpl.ID, true); err != nil {
|
||||
return
|
||||
}
|
||||
if verbose {
|
||||
|
||||
Reference in New Issue
Block a user