Reputation: 21
In a project I use spring-batch, as a part of cleanup for processes that stuck I use
JobExplorer.findRunningJobExecutions(...)
but that function return empty set. After digging I found next problem: spring-batch use SQL like
SELECT E.JOB_EXECUTION_ID, ... from %PREFIX%JOB_EXECUTION E ... WHERE ... E.END_TIME is NULL ...
. After running long job, I got that from beginning 3 Dates in %PREFIX%JOB_EXECUTION (CREATE_TIME, START_TIME, END_TIME) have same value. This mean that SQL will always return empty set.
Question is, am I one who get this? How to report bug to Spring team?
Upvotes: 2
Views: 2414
Reputation: 3582
Here is the link to the Spring batch project home page
Jira's can be Entered here
Not sure what version you are running, but with version 2.1.1 (which is real old I know) but this code works.
jobOperator.getRunningExecutions(String jobName)
Here is the javadoc from that version
/**
* Get the id values of all the running {@link JobExecution JobExecutions}
* with the given job name.
*
* @param jobName the name of the job to search under
* @return the id values of the running {@link JobExecution} instances
* @throws NoSuchJobException if there are no {@link JobExecution
* JobExecutions} with that job name
*/
Set<Long> getRunningExecutions(String jobName) throws NoSuchJobException;
Link to the most update JobOperator
Hope this helps.
Upvotes: 1