From d2453597e6f9868db2475cead7b8d503f9bbce75 Mon Sep 17 00:00:00 2001 From: chenlinghy Date: Wed, 20 Jan 2021 09:20:23 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=E4=BF=AE=E6=94=B9=E8=BF=AA?= =?UTF-8?q?=E6=99=AE=E8=AE=BE=E5=A4=87=E5=81=9C=E6=AD=A2=E5=92=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E6=97=81=E8=B7=AF=E6=89=8B=E5=8A=A8=E7=89=B5=E5=BC=95?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ability/impl/DpTechBypassAbilityImpl.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java b/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java index ae64b203..a3b85483 100644 --- a/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java +++ b/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java @@ -347,6 +347,12 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl { return ErrorCode.ERR_CALLDEVICE; } + // 更新缓存状态 + if (dpBypassManager.getTractionStrategyName().containsKey(policyName)) { + DpTractionStrategy ts = dpBypassManager.getTractionStrategyName().get(policyName); + ts.setRunning(false); + } + return ErrorCode.ERR_OK; } @@ -373,6 +379,8 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl { if (ret.getResultRetVal() == 0) { log.debug("Remove Traction Strategy {} Succeed", tractionName); + //移除缓存信息 + dpBypassManager.getTractionStrategyName().remove(tractionName); return ErrorCode.ERR_OK; } else { log.error("!!!!Remove Traction Strategy {} Error: {}", tractionName, @@ -934,12 +942,6 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl { String policyName = getTractionStrategyName(disposeObject); - // 更新缓存状态 - if (dpBypassManager.getTractionStrategyName().containsKey(policyName)) { - DpTractionStrategy ts = dpBypassManager.getTractionStrategyName().get(policyName); - ts.setRunning(false); - } - err = removeTractionStrategy(policyName); if (err != ErrorCode.ERR_OK) { @@ -948,10 +950,6 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl { } } - //移除缓存信息 - String policyName = getTractionStrategyName(disposeObject); - dpBypassManager.getTractionStrategyName().remove(policyName); - log.info("----Finish DPTech Stop Cleanup Task Succeed: {}", disposeObject); return new MulReturnType<>(ErrorCode.ERR_OK, null); } catch (Exception ex) {