Files
DeepTutor/deeptutor/services
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-08-02 13:23:45 +08:00
2026-06-17 00:56:27 +08:00
2026-07-24 03:06:58 +08:00
2026-06-11 20:03:34 +08:00
2026-05-08 02:36:24 +08:00
2026-08-13 18:49:48 +08:00
2026-07-31 00:25:48 +08:00
2026-06-18 00:22:48 +08:00
2026-06-11 20:03:34 +08:00
2026-06-17 00:56:27 +08:00
2026-06-18 00:22:48 +08:00