diff --git a/jberet-core/src/main/java/org/jberet/repository/JdbcRepository.java b/jberet-core/src/main/java/org/jberet/repository/JdbcRepository.java index cd16f3d10..9513f7e14 100644 --- a/jberet-core/src/main/java/org/jberet/repository/JdbcRepository.java +++ b/jberet-core/src/main/java/org/jberet/repository/JdbcRepository.java @@ -76,6 +76,7 @@ public final class JdbcRepository extends AbstractPersistentRepository { private static final String SELECT_ALL_JOB_EXECUTIONS = "select-all-job-executions"; private static final String SELECT_JOB_EXECUTIONS_BY_JOB_INSTANCE_ID = "select-job-executions-by-job-instance-id"; + private static final String SELECT_JOB_EXECUTIONS_BY_TIMEOUT_SECONDS = "select-job-executions-by-timeout-seconds"; private static final String SELECT_RUNNING_JOB_EXECUTIONS_BY_JOB_NAME = "select-running-job-executions-by-job-name"; private static final String SELECT_JOB_EXECUTIONS_BY_JOB_NAME = "select-job-executions-by-job-name"; private static final String SELECT_JOB_EXECUTION = "select-job-execution"; @@ -653,6 +654,8 @@ public List getJobExecutions(final JobInstance jobInstance) { // todo @Override public List getTimeoutJobExecutions(JobInstance jobInstance, Long timeoutSeconds) { + + return List.of(); } diff --git a/jberet-core/src/main/resources/sql/jberet-sql.properties b/jberet-core/src/main/resources/sql/jberet-sql.properties index 316e0f715..63b72321b 100644 --- a/jberet-core/src/main/resources/sql/jberet-sql.properties +++ b/jberet-core/src/main/resources/sql/jberet-sql.properties @@ -6,6 +6,9 @@ insert-job-instance = INSERT INTO JOB_INSTANCE(JOBNAME, APPLICATIONNAME) VALUES( select-all-job-executions = SELECT * FROM JOB_EXECUTION select-job-executions-by-job-instance-id = SELECT * FROM JOB_EXECUTION WHERE JOBINSTANCEID=? ORDER BY JOBEXECUTIONID + +select-job-executions-by-timeout-seconds = SELECT * FROM JOB_EXECUTION WHERE lastupdatedtime + ? < now() + select-job-execution = SELECT * FROM JOB_EXECUTION WHERE JOBEXECUTIONID=? select-running-job-executions-by-job-name = SELECT JOB_EXECUTION.JOBEXECUTIONID FROM JOB_EXECUTION \ INNER JOIN JOB_INSTANCE ON JOB_EXECUTION.JOBINSTANCEID=JOB_INSTANCE.JOBINSTANCEID \