mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 20:16:48 +00:00
Write chat traces off the stream's thread
The OTel replay and the trace INSERT ran in the stream's finally, so a slow database held the SSE connection open after the last event. The trace is still frozen when the stream ends, but written on a small writer pool.
This commit is contained in:
1 parent
0591580014
commit
778830208b
7 files changed
+91
-19
No files matched your search
@@ -188,7 +188,7 @@ class TestExtractGraphTrace:
|
||||
monkeypatch.setattr("docsgpt.graphrag.extraction.extract_graph_for_source", extract)
|
||||
flushed = []
|
||||
|
||||
def _flush(trace, status=None):
|
||||
def _flush(trace, status=None, **_kwargs):
|
||||
trace.flushed = True
|
||||
trace.finish(status)
|
||||
flushed.append(trace)
|
||||
|
||||
Reference in new issue
Block a user