-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
@apptie
Description
When issue #4755 is applied, a consistent policy is applied in SimpleStepHandler that blocks restart if the Job's status is Complete.
Lines 214 to 222 in 3bcc525
if ((stepStatus == BatchStatus.COMPLETED && !step.isAllowStartIfComplete())
|| stepStatus == BatchStatus.ABANDONED) {
// step is complete, false should be returned, indicating that the
// step should not be started
if (logger.isInfoEnabled()) {
logger.info("Step already complete or not restartable, so no action to execute: " + lastStepExecution);
}
return false;
}
(stepStatus == BatchStatus.COMPLETED && !step.isAllowStartIfComplete())
Therefore, that code appears to be unnecessary.
However, we still need to check if the Step's status is ABANDONED, so I think the code can be changed as follows.
if (stepStatus == BatchStatus.ABANDONED) { // step is abandoned, false should be returned, indicating that the // step should not be started if (logger.isInfoEnabled()) { logger.info("Step is abandoned, so no action to execute: " + lastStepExecution); } return false; }