(converter) Make processing pool size configurable

This commit is contained in:
Viktor Lofgren 2024-02-10 20:59:08 +01:00
parent e66d0b7431
commit 9d68062553

View File

@ -120,7 +120,10 @@ public class ConverterMain extends ProcessMainClass {
public void convert(CrawlPlan plan) throws Exception {
final int maxPoolSize = Math.clamp(Runtime.getRuntime().availableProcessors() - 2, 1, 32);
final int maxPoolSize =
Integer.getInteger("converter.poolSize",
Math.clamp(Runtime.getRuntime().availableProcessors() - 2, 1, 32)
);
try (BatchingWorkLog batchingWorkLog = new BatchingWorkLogImpl(plan.process.getLogFile());
ConverterWriter converterWriter = new ConverterWriter(batchingWorkLog, plan.process.getDir()))