Skip to content

Commit

Permalink
Use StoppableTasklet#stop(StepExecution) in SimpleJobOperator#stop(lo…
Browse files Browse the repository at this point in the history
…ng executionId)
  • Loading branch information
HyunSangHan committed Nov 24, 2024
1 parent bc160ff commit 7eb7782
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public boolean stop(long executionId) throws NoSuchJobExecutionException, JobExe
Tasklet tasklet = ((TaskletStep) step).getTasklet();
if (tasklet instanceof StoppableTasklet) {
StepSynchronizationManager.register(stepExecution);
((StoppableTasklet) tasklet).stop();
((StoppableTasklet) tasklet).stop(stepExecution);
StepSynchronizationManager.release();
}
}
Expand All @@ -363,7 +363,7 @@ public boolean stop(long executionId) throws NoSuchJobExecutionException, JobExe
}
}
catch (NoSuchJobException e) {
logger.warn("Cannot find Job object in the job registry. StoppableTasklet#stop() will not be called", e);
logger.warn("Cannot find Job object in the job registry. StoppableTasklet#stop(StepExecution stepExecution) will not be called", e);
}

return true;
Expand Down

0 comments on commit 7eb7782

Please sign in to comment.