Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

When Issue #4755 is applied, unnecessary code occurs in SimpleStepHandler #4953

Closed
Labels
@apptie

Description

When issue #4755 is applied, a consistent policy is applied in SimpleStepHandler that blocks restart if the Job's status is Complete.

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /