|
@@ -40,7 +40,7 @@ func NewWafTask(
|
|
|
globalLimitRep repository.GlobalLimitRepository,
|
|
|
expiredRep repository.ExpiredRepository,
|
|
|
task *Task,
|
|
|
- gatewayGroupIpRep repository.GateWayGroupIpRepository,
|
|
|
+ gatewayIpRep repository.GatewayipRepository,
|
|
|
tcp service.TcpforwardingService,
|
|
|
udp service.UdpForWardingService,
|
|
|
web service.WebForwardingService,
|
|
@@ -54,7 +54,7 @@ func NewWafTask(
|
|
|
hostRep: hostRep,
|
|
|
globalLimitRep: globalLimitRep,
|
|
|
expiredRep: expiredRep,
|
|
|
- gatewayGroupIpRep: gatewayGroupIpRep,
|
|
|
+ gatewayIpRep: gatewayIpRep,
|
|
|
tcp: tcp,
|
|
|
udp: udp,
|
|
|
web: web,
|
|
@@ -70,7 +70,7 @@ type wafTask struct {
|
|
|
hostRep repository.HostRepository
|
|
|
globalLimitRep repository.GlobalLimitRepository
|
|
|
expiredRep repository.ExpiredRepository
|
|
|
- gatewayGroupIpRep repository.GateWayGroupIpRepository
|
|
|
+ gatewayIpRep repository.GatewayipRepository
|
|
|
tcp service.TcpforwardingService
|
|
|
udp service.UdpForWardingService
|
|
|
web service.WebForwardingService
|
|
@@ -296,10 +296,7 @@ func (t *wafTask) executeSinglePlanCleanup(ctx context.Context, limit model.Glob
|
|
|
// 只有在上述所有步骤都没有出错的情况下,才执行最终的数据库更新和Redis标记
|
|
|
if allErrors.ErrorOrNil() == nil {
|
|
|
// 执行您指定的数据库“重置”操作
|
|
|
- err = t.globalLimitRep.UpdateGlobalLimitByHostId(ctx, &model.GlobalLimit{
|
|
|
- HostId: limit.HostId,
|
|
|
- State: true,
|
|
|
- })
|
|
|
+ err := t.gatewayIpRep.CleanIPByHostId(ctx, []int64{hostId})
|
|
|
if err != nil {
|
|
|
allErrors = multierror.Append(allErrors, err)
|
|
|
}
|