diff --git a/src/main/java/com/dispose/common/DisposeConfigValue.java b/src/main/java/com/dispose/common/DisposeConfigValue.java index c5525dfe..3691df59 100644 --- a/src/main/java/com/dispose/common/DisposeConfigValue.java +++ b/src/main/java/com/dispose/common/DisposeConfigValue.java @@ -62,5 +62,5 @@ public class DisposeConfigValue { /** * The constant HEART_PERIOD_OF_SECOND. */ - public static long HEART_PERIOD_OF_SECOND = 30; + public static final long HEART_PERIOD_OF_SECOND = 30; } diff --git a/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java b/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java index b75628e2..b60b2714 100644 --- a/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java +++ b/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java @@ -68,9 +68,6 @@ public class EncryptionPropertyResolver implements EncryptablePropertyResolver { //自定义密文解密 byte[] encode = CryptoHelper.aes256Decryption(CryptoHelper.base64Decryption(value), password); -// log.info("+++++++++++++++++++Decrypt with key {}: {} --> {}", this.password, value, -// new String(encode, StandardCharsets.UTF_8)); - return new String(encode, StandardCharsets.UTF_8); } } diff --git a/src/main/java/com/dispose/service/impl/DeviceTaskManagerServiceImpl.java b/src/main/java/com/dispose/service/impl/DeviceTaskManagerServiceImpl.java index c818c560..f43d2a73 100644 --- a/src/main/java/com/dispose/service/impl/DeviceTaskManagerServiceImpl.java +++ b/src/main/java/com/dispose/service/impl/DeviceTaskManagerServiceImpl.java @@ -166,6 +166,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService { */ private void dpTechDeviceTaskRun(AbilityInfo ai, DeviceTask deviceTask, DisposeTask disposeTask) { MulReturnType ret; + final int nTime = 10; // 设置任务状态为启动中 deviceTaskManager.changeDisposeDeviceTaskInfoStatus(deviceTask.getId(), DisposeTaskStatus.TASK_STARTING); @@ -191,7 +192,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService { deviceTask); deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0); - } else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * 10) { + } else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * nTime) { // 设置该任务为新任务,待下次重试启动 // 记录任务出错重试次数 deviceTask.setErrRetry(deviceTask.getErrRetry() + 1); @@ -226,7 +227,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService { deviceTask); deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0); - } else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * 10) { + } else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * nTime) { // 设置该任务为新任务,待下次重试启动 // 记录任务出错重试次数 deviceTask.setErrRetry(deviceTask.getErrRetry() + 1); diff --git a/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java b/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java index f60880a1..888853a3 100644 --- a/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java +++ b/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java @@ -57,7 +57,6 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ */ @PostConstruct private void initDisposeAbility() { - //List devList = disposeDeviceManager.getAllNormalDisposeDevices(); List devList = disposeDeviceManager.getAllDisposeDevices(); devList.forEach(this::addDisposeAbilityDevice); }