Skip to content

Commit

Permalink
MOSIP-35611 Fixed startup issue
Browse files Browse the repository at this point in the history
Signed-off-by: kameshsr <[email protected]>
  • Loading branch information
kameshsr committed Nov 29, 2024
1 parent 4ae6f33 commit 6eb2a75
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ public class Config {

@Value("${" + ResidentConstants.RESIDENT_REST_TEMPLATE_METRICS_INTERCEPTOR_FILTER_ENABLED + ":false}")
private boolean isResidentMetricsInterceptorFilterEnabled;


@Value("${task.scheduler.pool-size:10}")
private int poolSize;

@Value("${task.scheduler.await-termination-seconds:30}")
private int awaitTerminationSeconds;

@Value("${task.scheduler.wait-for-tasks-to-complete-on-shutdown:true}")
private boolean waitForTasksToCompleteOnShutdown;

@Autowired(required = false)
private RestTemplateLoggingInterceptor restTemplateLoggingInterceptor;
Expand Down Expand Up @@ -177,6 +185,9 @@ public ThreadPoolTaskScheduler threadPoolTaskScheduler() {
ThreadPoolTaskScheduler threadPoolTaskScheduler = new ThreadPoolTaskScheduler();
threadPoolTaskScheduler.setPoolSize(5);
threadPoolTaskScheduler.setThreadNamePrefix("ThreadPoolTaskScheduler");
threadPoolTaskScheduler.setPoolSize(poolSize);
threadPoolTaskScheduler.setWaitForTasksToCompleteOnShutdown(waitForTasksToCompleteOnShutdown);
threadPoolTaskScheduler.setAwaitTerminationSeconds(awaitTerminationSeconds);
return threadPoolTaskScheduler;
}

Expand Down

0 comments on commit 6eb2a75

Please sign in to comment.