提交 0d5b4abc 编写于 作者: Q qiaozhanwei

only one master restart need failure and tolerant task restart scheduler

上级 0ee5bfc4
......@@ -1526,6 +1526,14 @@ public class ProcessDao extends AbstractBaseDao {
}
public void selfFaultTolerant(int ... states){
List<ProcessInstance> processInstanceList = processInstanceMapper.listByStatus(states);
for (ProcessInstance processInstance:processInstanceList){
selfFaultTolerant(processInstance);
}
}
@Transactional(value = "TransactionManager",rollbackFor = Exception.class)
public void selfFaultTolerant(ProcessInstance processInstance){
......
......@@ -123,9 +123,9 @@ public class ZKMasterClient extends AbstractZKClient {
// register master
this.registMaster();
// check if fault tolerance is required
// check if fault tolerance is required,failure and tolerance
if (getActiveMasterNum() == 1) {
processDao.selfFaultTolerant(ExecutionStatus.RUNNING_EXEUTION.ordinal());
processDao.selfFaultTolerant(ExecutionStatus.RUNNING_EXEUTION.ordinal(),ExecutionStatus.NEED_FAULT_TOLERANCE.ordinal());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册