From 85efc2deb421d667e01fe8789509d3fe202218b2 Mon Sep 17 00:00:00 2001 From: jruaux Date: Fri, 24 May 2024 12:32:10 -0700 Subject: [PATCH] deps: Upgraded spring batch redis --- .../com/redis/riot/core/AbstractJobCommand.java | 13 ++++++++++++- gradle.properties | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/core/riot-core/src/main/java/com/redis/riot/core/AbstractJobCommand.java b/core/riot-core/src/main/java/com/redis/riot/core/AbstractJobCommand.java index 22505a601..efb645722 100644 --- a/core/riot-core/src/main/java/com/redis/riot/core/AbstractJobCommand.java +++ b/core/riot-core/src/main/java/com/redis/riot/core/AbstractJobCommand.java @@ -42,9 +42,12 @@ @Command public abstract class AbstractJobCommand extends AbstractCommand { + public static final String DEFAULT_JOB_REPOSITORY_NAME = "riot"; + @ArgGroup(exclusive = false, heading = "Job options%n") private JobArgs jobArgs = new JobArgs(); + private String jobRepositoryName = DEFAULT_JOB_REPOSITORY_NAME; protected JobRepository jobRepository; protected PlatformTransactionManager transactionManager; protected JobLauncher jobLauncher; @@ -88,7 +91,7 @@ protected void setup() { } if (jobRepository == null) { try { - jobRepository = JobUtils.jobRepositoryFactoryBean().getObject(); + jobRepository = JobUtils.jobRepositoryFactoryBean(jobRepositoryName).getObject(); } catch (Exception e) { throw new BeanInitializationException("Could not initialize job repository", e); } @@ -228,6 +231,14 @@ public void setJobArgs(JobArgs args) { this.jobArgs = args; } + public String getJobRepositoryName() { + return jobRepositoryName; + } + + public void setJobRepositoryName(String jobRepositoryName) { + this.jobRepositoryName = jobRepositoryName; + } + public JobRepository getJobRepository() { return jobRepository; } diff --git a/gradle.properties b/gradle.properties index bb861ff6e..55ee799a2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -36,9 +36,9 @@ gcpVersion = 1.2.8.RELEASE globVersion = 0.9.0 latencyUtilsVersion = 2.0.3 lettucemodVersion = 3.8.0 -picocliVersion = 4.7.5 +picocliVersion = 4.7.6 progressbarVersion = 0.10.1 -springBatchRedisVersion = 4.3.4 +springBatchRedisVersion = 4.3.5 testcontainersRedisVersion = 2.2.2 org.gradle.daemon = false