REM:
1.修改迪普设备停止和移除旁路手动牵引策略方法
This commit is contained in:
chenlinghy 2021-01-20 09:20:23 +08:00
parent 781907eb12
commit d2453597e6
1 changed files with 8 additions and 10 deletions

View File

@ -347,6 +347,12 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
return ErrorCode.ERR_CALLDEVICE; return ErrorCode.ERR_CALLDEVICE;
} }
// 更新缓存状态
if (dpBypassManager.getTractionStrategyName().containsKey(policyName)) {
DpTractionStrategy ts = dpBypassManager.getTractionStrategyName().get(policyName);
ts.setRunning(false);
}
return ErrorCode.ERR_OK; return ErrorCode.ERR_OK;
} }
@ -373,6 +379,8 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
if (ret.getResultRetVal() == 0) { if (ret.getResultRetVal() == 0) {
log.debug("Remove Traction Strategy {} Succeed", tractionName); log.debug("Remove Traction Strategy {} Succeed", tractionName);
//移除缓存信息
dpBypassManager.getTractionStrategyName().remove(tractionName);
return ErrorCode.ERR_OK; return ErrorCode.ERR_OK;
} else { } else {
log.error("!!!!Remove Traction Strategy {} Error: {}", tractionName, log.error("!!!!Remove Traction Strategy {} Error: {}", tractionName,
@ -934,12 +942,6 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
String policyName = getTractionStrategyName(disposeObject); String policyName = getTractionStrategyName(disposeObject);
// 更新缓存状态
if (dpBypassManager.getTractionStrategyName().containsKey(policyName)) {
DpTractionStrategy ts = dpBypassManager.getTractionStrategyName().get(policyName);
ts.setRunning(false);
}
err = removeTractionStrategy(policyName); err = removeTractionStrategy(policyName);
if (err != ErrorCode.ERR_OK) { 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); log.info("----Finish DPTech Stop Cleanup Task Succeed: {}", disposeObject);
return new MulReturnType<>(ErrorCode.ERR_OK, null); return new MulReturnType<>(ErrorCode.ERR_OK, null);
} catch (Exception ex) { } catch (Exception ex) {