From 4edc3478dd06aedc4042dd4c73e20e6235b30c69 Mon Sep 17 00:00:00 2001 From: muralibasani Date: Fri, 13 Oct 2023 16:01:29 +0200 Subject: [PATCH] Updating cluster api props - scheduler Signed-off-by: muralibasani --- .../io/aiven/klaw/clusterapi/config/SchedulerConfig.java | 5 ++++- cluster-api/src/main/resources/application.properties | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cluster-api/src/main/java/io/aiven/klaw/clusterapi/config/SchedulerConfig.java b/cluster-api/src/main/java/io/aiven/klaw/clusterapi/config/SchedulerConfig.java index 0c30b302d2..f3c3ab5333 100644 --- a/cluster-api/src/main/java/io/aiven/klaw/clusterapi/config/SchedulerConfig.java +++ b/cluster-api/src/main/java/io/aiven/klaw/clusterapi/config/SchedulerConfig.java @@ -14,6 +14,9 @@ public class SchedulerConfig { @Value("${klaw.schemainfo.scheduler.threadcount:4}") private int poolSize; + @Value("${klaw.topics.scheduler.threadcount:4}") + private int poolSizeTopics; + @Bean(name = "resetSchemaCacheTaskExecutor") public Executor threadPoolTaskExecutor() { ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor(); @@ -24,7 +27,7 @@ public Executor threadPoolTaskExecutor() { @Bean(name = "resetTopicsCacheTaskExecutor") public Executor topicsThreadPoolTaskExecutor() { ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor(); - threadPoolTaskExecutor.setCorePoolSize(poolSize); + threadPoolTaskExecutor.setCorePoolSize(poolSizeTopics); return threadPoolTaskExecutor; } } diff --git a/cluster-api/src/main/resources/application.properties b/cluster-api/src/main/resources/application.properties index 956cd317e4..35c58489f8 100644 --- a/cluster-api/src/main/resources/application.properties +++ b/cluster-api/src/main/resources/application.properties @@ -96,4 +96,9 @@ klaw.clusters.aiven.servicedetails.api=https://api.aiven.io/v1/project/projectNa # scheduler for schema cache update runs at default 12 am UTC everyday klaw.schemainfo.cron.expression=0 0 0 * * ? klaw.schemainfo.cron.expression.timezone=UTC -klaw.schemainfo.scheduler.threadcount=4 \ No newline at end of file +klaw.schemainfo.scheduler.threadcount=4 + +# scheduler for topics cache update runs at default 12 am UTC everyday +klaw.topics.cron.expression=0 0 0 * * ? +klaw.topics.cron.expression.timezone=UTC +klaw.topics.scheduler.threadcount=4 \ No newline at end of file