mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 14:05:05 +02:00
UBERF-8425: Improve parallel ws upgrade logging within one ws service (#9118)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
@@ -32,7 +32,6 @@ import {
|
||||
DOMAIN_TX,
|
||||
generateId,
|
||||
makeDocCollabId,
|
||||
MeasureMetricsContext,
|
||||
type Ref,
|
||||
SortingOrder,
|
||||
toIdMap,
|
||||
@@ -280,7 +279,6 @@ async function migrateSpaceTypes (client: MigrationClient): Promise<void> {
|
||||
}
|
||||
|
||||
async function migrateDocSections (client: MigrationClient): Promise<void> {
|
||||
const ctx = new MeasureMetricsContext('migrate_doc_sections', {})
|
||||
const storage = client.storageAdapter
|
||||
|
||||
const targetDocuments = await client.find<ControlledDocument>(DOMAIN_DOCUMENTS, {
|
||||
@@ -303,7 +301,7 @@ async function migrateDocSections (client: MigrationClient): Promise<void> {
|
||||
// Migrate sections headers + content
|
||||
try {
|
||||
const collabId = makeDocCollabId(document, 'content')
|
||||
const ydoc = await loadCollabYdoc(ctx, storage, client.wsIds, collabId)
|
||||
const ydoc = await loadCollabYdoc(client.ctx, storage, client.wsIds, collabId)
|
||||
if (ydoc === undefined) {
|
||||
// no content, ignore
|
||||
continue
|
||||
@@ -349,9 +347,9 @@ async function migrateDocSections (client: MigrationClient): Promise<void> {
|
||||
}
|
||||
})
|
||||
|
||||
await saveCollabYdoc(ctx, storage, client.wsIds, collabId, ydoc)
|
||||
await saveCollabYdoc(client.ctx, storage, client.wsIds, collabId, ydoc)
|
||||
} catch (err) {
|
||||
ctx.error('error collaborative document content migration', { error: err, document: document.title })
|
||||
client.logger.error('error collaborative document content migration', { error: err, document: document.title })
|
||||
}
|
||||
|
||||
attachmentsOps.push({
|
||||
|
||||
Reference in New Issue
Block a user