parent
c34b9ecb3d
commit
6903b6c285
|
@ -62,5 +62,5 @@ public class DisposeConfigValue {
|
||||||
/**
|
/**
|
||||||
* The constant HEART_PERIOD_OF_SECOND.
|
* The constant HEART_PERIOD_OF_SECOND.
|
||||||
*/
|
*/
|
||||||
public static long HEART_PERIOD_OF_SECOND = 30;
|
public static final long HEART_PERIOD_OF_SECOND = 30;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,9 +68,6 @@ public class EncryptionPropertyResolver implements EncryptablePropertyResolver {
|
||||||
//自定义密文解密
|
//自定义密文解密
|
||||||
byte[] encode = CryptoHelper.aes256Decryption(CryptoHelper.base64Decryption(value), password);
|
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);
|
return new String(encode, StandardCharsets.UTF_8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,6 +166,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
|
||||||
*/
|
*/
|
||||||
private void dpTechDeviceTaskRun(AbilityInfo ai, DeviceTask deviceTask, DisposeTask disposeTask) {
|
private void dpTechDeviceTaskRun(AbilityInfo ai, DeviceTask deviceTask, DisposeTask disposeTask) {
|
||||||
MulReturnType<ErrorCode, String> ret;
|
MulReturnType<ErrorCode, String> ret;
|
||||||
|
final int nTime = 10;
|
||||||
|
|
||||||
// 设置任务状态为启动中
|
// 设置任务状态为启动中
|
||||||
deviceTaskManager.changeDisposeDeviceTaskInfoStatus(deviceTask.getId(), DisposeTaskStatus.TASK_STARTING);
|
deviceTaskManager.changeDisposeDeviceTaskInfoStatus(deviceTask.getId(), DisposeTaskStatus.TASK_STARTING);
|
||||||
|
@ -191,7 +192,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
|
||||||
deviceTask);
|
deviceTask);
|
||||||
|
|
||||||
deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0);
|
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);
|
deviceTask.setErrRetry(deviceTask.getErrRetry() + 1);
|
||||||
|
@ -226,7 +227,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
|
||||||
deviceTask);
|
deviceTask);
|
||||||
|
|
||||||
deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0);
|
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);
|
deviceTask.setErrRetry(deviceTask.getErrRetry() + 1);
|
||||||
|
|
|
@ -57,7 +57,6 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ
|
||||||
*/
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
private void initDisposeAbility() {
|
private void initDisposeAbility() {
|
||||||
//List<DisposeDevice> devList = disposeDeviceManager.getAllNormalDisposeDevices();
|
|
||||||
List<DisposeDevice> devList = disposeDeviceManager.getAllDisposeDevices();
|
List<DisposeDevice> devList = disposeDeviceManager.getAllDisposeDevices();
|
||||||
devList.forEach(this::addDisposeAbilityDevice);
|
devList.forEach(this::addDisposeAbilityDevice);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue