feat(api): set maxDuration for document parsed events route

Define maxDuration as 300 seconds for the parsed events API route to explicitly
control execution timeouts during long-running PDF layout processing. This
ensures more predictable serverless behavior for streaming operations.
This commit is contained in:
Richard R 2026-05-27 01:41:29 -06:00
parent 956ecf5f4a
commit 1ec9632d4b

View file

@ -17,6 +17,7 @@ import type { PdfLayoutJobResult, WorkerOperationEvent, WorkerOperationState } f
export const dynamic = 'force-dynamic';
export const runtime = 'nodejs';
export const maxDuration = 300;
const SSE_KEEPALIVE_MS = 15_000;
const SSE_RESYNC_INTERVAL_MS = 30_000;