mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-02 02:12:25 +00: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:
parent
53c7ed3370
commit
b3bb82e776
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue