BATCH-2630 - update not to rely on step execution order from DAO

This commit is contained in:
Cameron
2017-07-12 16:46:56 -04:00
committed by Michael Minella
parent d0a3278d12
commit 9256148cf2

View File

@@ -236,6 +236,11 @@ public class SimpleJobRepository implements JobRepository {
if (latest.getStartTime().getTime() < stepExecution.getStartTime().getTime()) {
latest = stepExecution;
}
// Use step execution ID as the tie breaker if start time is identical
if (latest.getStartTime().getTime() == stepExecution.getStartTime().getTime() &&
latest.getId() < stepExecution.getId()) {
latest = stepExecution;
}
}
if (latest != null) {