RED-7669: optimize OCR-module performance
* fix thread handling for PDFs without any images
This commit is contained in:
parent
6f29270e66
commit
67540950b8
@ -61,7 +61,11 @@ public class ImageProcessingThread extends Thread {
|
||||
while (!allImagesExtracted) {
|
||||
final UnprocessedImage image = imageInputQueue.take();
|
||||
var ocrImage = this.process(image);
|
||||
imageOutputQueue.put(ocrImage);
|
||||
try {
|
||||
imageOutputQueue.put(ocrImage);
|
||||
} catch (InterruptedException e) {
|
||||
imageOutputQueue.put(ocrImage);
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
log.info("All images extracted, emptying processing queue and stopping");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user