REM:
1. 修正部分代码检测警告
This commit is contained in:
HuangXin 2021-02-03 14:29:37 +08:00
parent c34b9ecb3d
commit 6903b6c285
4 changed files with 4 additions and 7 deletions

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -166,6 +166,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
*/
private void dpTechDeviceTaskRun(AbilityInfo ai, DeviceTask deviceTask, DisposeTask disposeTask) {
MulReturnType<ErrorCode, String> 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);

View File

@ -57,7 +57,6 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ
*/
@PostConstruct
private void initDisposeAbility() {
//List<DisposeDevice> devList = disposeDeviceManager.getAllNormalDisposeDevices();
List<DisposeDevice> devList = disposeDeviceManager.getAllDisposeDevices();
devList.forEach(this::addDisposeAbilityDevice);
}