Skip to content

Commit

Permalink
Updating cluster api props - scheduler
Browse files Browse the repository at this point in the history
Signed-off-by: muralibasani <[email protected]>
  • Loading branch information
muralibasani committed Oct 13, 2023
1 parent a565f29 commit 4edc347
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
}
}
7 changes: 6 additions & 1 deletion cluster-api/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

0 comments on commit 4edc347

Please sign in to comment.