Browse Source

Merge pull request #338 from lenboo/branch-1.0.2

add tolerance tasks when start failure task
pull/2/head
bao liang 6 years ago committed by GitHub
parent
commit
21eb6f70a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java

2
escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java

@ -588,10 +588,12 @@ public class ProcessDao extends AbstractBaseDao {
case START_FAILURE_TASK_PROCESS:
// find failed tasks and init these tasks
List<Integer> failedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.FAILURE);
List<Integer> toleranceList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.NEED_FAULT_TOLERANCE);
List<Integer> killedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL);
cmdParam.remove(Constants.CMDPARAM_RECOVERY_START_NODE_STRING);
failedList.addAll(killedList);
failedList.addAll(toleranceList);
for(Integer taskId : failedList){
initTaskInstance(this.findTaskInstanceById(taskId));
}

Loading…
Cancel
Save