mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-01 19:58:29 +08:00
[Improvement]Add a stop function when you are ready to do pause operation (#11543)
* add can stop for execute state machine * add execute type check for pause operation
This commit is contained in:
parent
277c78010f
commit
3b72c6efe7
@ -478,11 +478,15 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
||||
boolean checkResult = false;
|
||||
switch (executeType) {
|
||||
case PAUSE:
|
||||
case STOP:
|
||||
if (executionStatus.isRunning()) {
|
||||
checkResult = true;
|
||||
}
|
||||
break;
|
||||
case STOP:
|
||||
if (executionStatus.canStop()) {
|
||||
checkResult = true;
|
||||
}
|
||||
break;
|
||||
case REPEAT_RUNNING:
|
||||
if (executionStatus.isFinished()) {
|
||||
checkResult = true;
|
||||
|
@ -71,6 +71,10 @@ public enum WorkflowExecutionStatus {
|
||||
return this == RUNNING_EXECUTION;
|
||||
}
|
||||
|
||||
public boolean canStop() {
|
||||
return this == RUNNING_EXECUTION || this == READY_PAUSE;
|
||||
}
|
||||
|
||||
public boolean isFinished() {
|
||||
// todo: do we need to remove pause/block in finished judge?
|
||||
return isSuccess() || isFailure() || isStop() || isPause() || isBlock();
|
||||
|
Loading…
Reference in New Issue
Block a user