mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Refresh the conversation from the db in the websocket flow
This commit is contained in:
parent
fd07abbfc8
commit
2667ef4544
1 changed files with 4 additions and 0 deletions
|
@ -487,6 +487,10 @@ async def websocket_endpoint(
|
|||
if conversation:
|
||||
await sync_to_async(conversation.refresh_from_db)(fields=["conversation_log"])
|
||||
q = await websocket.receive_text()
|
||||
|
||||
# Refresh these because the connection to the database might have been closed
|
||||
await conversation.arefresh_from_db()
|
||||
|
||||
except WebSocketDisconnect:
|
||||
logger.debug(f"User {user} disconnected web socket")
|
||||
break
|
||||
|
|
Loading…
Add table
Reference in a new issue