Merge pull request #304 from qiaozhanwei/branch-1.0.2
only one master restart need failure and tolerant task restart scheduler
This commit is contained in:
commit
3ef73aea6b
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue