parent
b640ce5f27
commit
3625cf0069
|
@ -363,8 +363,10 @@ public class DpTechAbilityImpl implements DisposeAbility {
|
|||
public void periodTaskRuntime() {
|
||||
log.debug("++++DpTech Period Task Running");
|
||||
|
||||
// 更新防护对象
|
||||
getDisposeDeviceProtectObject();
|
||||
if (timerCnt++ % DpTechConfigValue.PROTECTION_UPGRADE_PERIOD == 0) {
|
||||
// 定时检测防护对象
|
||||
getDisposeDeviceProtectObject();
|
||||
}
|
||||
|
||||
// 更新心跳状态
|
||||
if (timerCnt++ % DisposeConfigValue.HEART_PERIOD_OF_SECOND == 0) {
|
||||
|
|
|
@ -81,6 +81,15 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
|
|||
return;
|
||||
}
|
||||
|
||||
if (ret.getProtectionTargetWithStrategyForService().size() == 0) {
|
||||
log.info("----Finish Begging DPTech Get All Protection Strategy Association Relation");
|
||||
return;
|
||||
}
|
||||
|
||||
ret.getProtectionTargetWithStrategyForService().forEach(k -> {
|
||||
|
||||
});
|
||||
|
||||
log.info("----Finish Begging DPTech Get All Protection Strategy Association Relation");
|
||||
|
||||
|
||||
|
@ -125,6 +134,11 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
|
|||
return;
|
||||
}
|
||||
|
||||
if (ret.getProtectionObjectDataForService().size() == 0) {
|
||||
log.debug("----Finish DPTech Get All Protection Objects Succeed");
|
||||
return;
|
||||
}
|
||||
|
||||
ret.getProtectionObjectDataForService().forEach(k -> {
|
||||
String objName = k.getProtectionName().getValue();
|
||||
// 删除非法的防护对象
|
||||
|
@ -143,7 +157,7 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
|
|||
} else {
|
||||
DpProtectObject obj;
|
||||
|
||||
if (!dpBypassManager.getProtectObject().containsKey(objName)) {
|
||||
if (dpBypassManager.getProtectObject().containsKey(objName)) {
|
||||
// 获取防护对象
|
||||
obj = dpBypassManager.getProtectObject().get(objName);
|
||||
} else {
|
||||
|
@ -207,8 +221,8 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
|
|||
super.periodTaskRuntime();
|
||||
|
||||
if (timerCnt++ % DpTechConfigValue.PROTECTION_UPGRADE_PERIOD == 0) {
|
||||
// 定时检测防护对象
|
||||
getDisposeDeviceProtectObject();
|
||||
// 更新防护对象与目标关联关系
|
||||
getProtectionStrategyTemplate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue