mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-07 16:30:49 +00:00
fix: ignore ydoc migration errors (#6402)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
f25866afcf
commit
f1d2d4512c
@ -197,8 +197,12 @@ async function processMigrateMarkupFor (
|
|||||||
const blob = await storageAdapter.stat(ctx, workspaceId, documentId)
|
const blob = await storageAdapter.stat(ctx, workspaceId, documentId)
|
||||||
// only for documents not in storage
|
// only for documents not in storage
|
||||||
if (blob === undefined) {
|
if (blob === undefined) {
|
||||||
const ydoc = markupToYDoc(value, attribute.name)
|
try {
|
||||||
await saveCollaborativeDoc(storageAdapter, workspaceId, collaborativeDoc, ydoc, ctx)
|
const ydoc = markupToYDoc(value, attribute.name)
|
||||||
|
await saveCollaborativeDoc(storageAdapter, workspaceId, collaborativeDoc, ydoc, ctx)
|
||||||
|
} catch (err) {
|
||||||
|
console.error('failed to process document', doc._class, doc._id, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,8 +230,12 @@ async function processMigrateContentFor (
|
|||||||
const blob = await storageAdapter.stat(ctx, client.workspaceId, documentId)
|
const blob = await storageAdapter.stat(ctx, client.workspaceId, documentId)
|
||||||
// only for documents not in storage
|
// only for documents not in storage
|
||||||
if (blob === undefined) {
|
if (blob === undefined) {
|
||||||
const ydoc = markupToYDoc(value, attribute.name)
|
try {
|
||||||
await saveCollaborativeDoc(storageAdapter, client.workspaceId, collaborativeDoc, ydoc, ctx)
|
const ydoc = markupToYDoc(value, attribute.name)
|
||||||
|
await saveCollaborativeDoc(storageAdapter, client.workspaceId, collaborativeDoc, ydoc, ctx)
|
||||||
|
} catch (err) {
|
||||||
|
console.error('failed to process document', doc._class, doc._id, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
update[attributeName] = collaborativeDoc
|
update[attributeName] = collaborativeDoc
|
||||||
|
Loading…
Reference in New Issue
Block a user