(converter) Make processing pool size configurable
This commit is contained in:
parent
e66d0b7431
commit
9d68062553
@ -120,7 +120,10 @@ public class ConverterMain extends ProcessMainClass {
|
|||||||
|
|
||||||
public void convert(CrawlPlan plan) throws Exception {
|
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());
|
try (BatchingWorkLog batchingWorkLog = new BatchingWorkLogImpl(plan.process.getLogFile());
|
||||||
ConverterWriter converterWriter = new ConverterWriter(batchingWorkLog, plan.process.getDir()))
|
ConverterWriter converterWriter = new ConverterWriter(batchingWorkLog, plan.process.getDir()))
|
||||||
|
Loading…
Reference in New Issue
Block a user