Fix Tesseract workerPath in Next.js standalone container, pool worker, and add timeout

This commit is contained in:
chrisf committed 2026-10-23 08:06:12 -06:00
1 parent 99522b3e09
commit 739cbce042
2 files changed
+49 -9

No files matched your search

+2 -1
View File
@@ -7,10 +7,11 @@ export async function POST(req: NextRequest) {
const body = await req.json().catch(() => ({}));
const limit = Math.min(parseInt(String(body.limit || '10'), 10) || 10, 50);
// Find image or PDF attachments that do not have extractedText yet
// Find image or PDF attachments that do not have extractedText yet (skip tiny icons < 2 KB)
const pendingAttachments = await prisma.attachment.findMany({
where: {
extractedText: null,
sizeBytes: { gte: 2048 },
OR: [
{ mimeType: { startsWith: 'image/' } },
{ mimeType: 'application/pdf' },