fix(async): increase thread pool to 2 threads + queue of 10
The old pool (1 thread, queue=1) meant OCR blocked all other async tasks (imports). Now 2 concurrent async tasks with a queue of 10 — enough for OCR + import to run in parallel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,10 +16,10 @@ public class AsyncConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
public Executor taskExecutor() {
|
public Executor taskExecutor() {
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
executor.setCorePoolSize(1);
|
executor.setCorePoolSize(2);
|
||||||
executor.setMaxPoolSize(1);
|
executor.setMaxPoolSize(2);
|
||||||
executor.setQueueCapacity(1);
|
executor.setQueueCapacity(10);
|
||||||
executor.setThreadNamePrefix("Import-");
|
executor.setThreadNamePrefix("Async-");
|
||||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.AbortPolicy());
|
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.AbortPolicy());
|
||||||
return executor;
|
return executor;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user