mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-26 17:30:27 -04:00
refac: scope ydoc update save scheduling to note documents (#30395)
The ydoc document update handler now schedules the debounced save only for note documents, since notes are the only ydoc documents with a save handler.
This commit is contained in:
@@ -890,7 +890,7 @@ async def yjs_document_update(sid, data):
|
||||
await asyncio.sleep(0.5)
|
||||
await document_save_handler(document_id, data.get('data', {}), user)
|
||||
|
||||
if data.get('data'):
|
||||
if document_id.startswith('note:') and data.get('data'):
|
||||
# Only drop the pending save when a new one takes its place.
|
||||
# Updates without a content snapshot (the resync a client sends
|
||||
# after rejoining a document) would otherwise cancel the pending
|
||||
|
||||
Reference in New Issue
Block a user