Fix last step execution retrieval in MongoStepExecutionDao
Resolves https://github.com/spring-projects-experimental/spring-batch-experimental/issues/3
This commit is contained in:
@@ -111,6 +111,7 @@ public class MongoStepExecutionDao implements StepExecutionDao {
|
||||
// first one
|
||||
Optional<org.springframework.batch.core.repository.persistence.StepExecution> lastStepExecution = stepExecutions
|
||||
.stream()
|
||||
.filter(stepExecution -> stepExecution.getName().equals(stepName))
|
||||
.min(Comparator
|
||||
.comparing(org.springframework.batch.core.repository.persistence.StepExecution::getCreateTime)
|
||||
.thenComparing(org.springframework.batch.core.repository.persistence.StepExecution::getId));
|
||||
|
||||
Reference in New Issue
Block a user