Files
DeepTutor/deeptutor
Wong 026ebc585a fix(rag): run document parsing off the event loop (KB indexing stalls all requests) (#847)
* fix(rag): run document parsing off the event loop

MinerU cloud parsing blocks end to end (upload + long polling + archive
download) on a synchronous httpx.Client. document_loader.load() awaited
the parser inline on the event loop, so indexing a KB stalled every
other request (chat WebSockets included) for the whole duration of each
PDF — same class of bug as #761/#777. Move _parse_document onto a worker
thread via asyncio.to_thread.

* test: prove document parsing stays off event loop

---------

Co-authored-by: interia <interia@users.noreply.github.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-08-16 19:15:40 +08:00
..
2026-06-11 20:03:34 +08:00
2026-08-02 13:07:32 +08:00
2026-07-18 19:47:03 +08:00
2026-04-23 19:29:16 +08:00
2026-04-23 19:29:16 +08:00
2026-08-13 18:49:48 +08:00