Skip to content

Commit 8807794

Browse files
committed
Override getJobInstanceCount in ResourcelessJobRepository
1 parent 4c86f33 commit 8807794

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/ResourcelessJobRepository.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 the original author or authors.
2+
* Copyright 2024-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -54,6 +54,11 @@ public boolean isJobInstanceExists(String jobName, JobParameters jobParameters)
5454
return false;
5555
}
5656

57+
@Override
58+
public long getJobInstanceCount(String jobName) {
59+
return 1;
60+
}
61+
5762
@Override
5863
public JobInstance createJobInstance(String jobName, JobParameters jobParameters) {
5964
this.jobInstance = new JobInstance(1L, jobName);

0 commit comments

Comments
 (0)