fix bug: tolerance task need not to check retry times
This commit is contained in:
parent
a40fcc0efa
commit
0bf8e270a6
|
|
@ -923,7 +923,11 @@ public class ProcessDao extends AbstractBaseDao {
|
|||
taskInstance.setFlag(Flag.NO);
|
||||
updateTaskInstance(taskInstance);
|
||||
// crate new task instance
|
||||
taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1 );
|
||||
if(taskInstance.getState() != ExecutionStatus.NEED_FAULT_TOLERANCE){
|
||||
taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1 );
|
||||
}
|
||||
taskInstance.setEndTime(null);
|
||||
taskInstance.setStartTime(new Date());
|
||||
taskInstance.setFlag(Flag.YES);
|
||||
taskInstance.setHost(null);
|
||||
taskInstance.setId(0);
|
||||
|
|
|
|||
|
|
@ -422,8 +422,12 @@ public class TaskInstance {
|
|||
if(this.isSubProcess()){
|
||||
return false;
|
||||
}
|
||||
return (this.getState().typeIsFailure()
|
||||
if(this.getState() == ExecutionStatus.NEED_FAULT_TOLERANCE){
|
||||
return true;
|
||||
}else {
|
||||
return (this.getState().typeIsFailure()
|
||||
&& this.getRetryTimes() < this.getMaxRetryTimes());
|
||||
}
|
||||
}
|
||||
|
||||
public void setDependency(String dependency) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue