fix(api): run native PDF extraction off the Node.js event loop
processPdf/detectPdf were synchronous napi calls. A large/complex PDF (e.g. 181 pages, complex layout) blocked the calling pod's event loop for its full extraction time (~25s observed in prod), freezing every in-flight request on the process, failing liveness probes, and timing out unrelated scrapes sharing the pod. Both bindings now offload to tokio's blocking pool via spawn_blocking (napi async fn), so extraction runs on a background thread and the event loop stays responsive. Call sites just await the same functions. Adds a regression test that fails on the old sync binding (measured ~1.25s of event-loop lag) and passes on the async one.
M
mogery committed
e33e1f6c15c6e4fc6df67dd6711743084f9a14bd
Parent: 215fa7c