REM:
1. 浩瀚设备、虚拟设备完成任务时清除状态
This commit is contained in:
HuangXin 2020-09-25 10:35:09 +08:00
parent e69960d579
commit ec838d467e
1 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
ret = ai.getDb().stopDispose(disposeTask.getDisposeIp(), disposeTask.getDisposeCapacity(), null, null, null);
if (ret.getFirstParam() == ErrorCode.ERR_OK) {
deviceTaskManager.setAttackTypeStatus(deviceTask.getId(),disposeTask.getFlowDirection(), 0L);
log.info("VIRTUAL_DISPOSE stop task succeed: {}", deviceTask);
} else {
log.error("VIRTUAL_DISPOSE stop task error {}: {}", ret.getFirstParam(), deviceTask);
@ -182,6 +183,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
// 设置任务状态为结束
deviceTaskManager.changeDisposeDeviceTaskInfoStatus(deviceTask.getId(), DisposeTaskStatus.TASK_FINISHED);
deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0);
deviceTaskManager.setAttackTypeStatus(deviceTask.getId(),disposeTask.getFlowDirection(), 0L);
} else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES) {
// 记录任务出错重试次数
deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), deviceTask.getErrRetry() + 1);