mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 12:55:59 +00:00
Upgrade OOM fix (#2748)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
f989c79c20
commit
ea492902f1
@ -1,4 +1,4 @@
|
||||
FROM node:16
|
||||
FROM node:18
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -1 +1 @@
|
||||
{ "major": 0, "minor": 6, "patch": 6 }
|
||||
{ "major": 0, "minor": 6, "patch": 73 }
|
||||
|
@ -37,14 +37,15 @@ async function fillCreatedBy (client: MigrationClient): Promise<void> {
|
||||
) {
|
||||
continue
|
||||
}
|
||||
while (true) {
|
||||
try {
|
||||
const objects = await client.find<Doc>(
|
||||
domain,
|
||||
{ createdBy: { $exists: false } },
|
||||
{ projection: { _id: 1, modifiedBy: 1 } }
|
||||
{ projection: { _id: 1, modifiedBy: 1 }, limit: 10000 }
|
||||
)
|
||||
if (objects.length === 0) {
|
||||
continue
|
||||
break
|
||||
}
|
||||
const txes = await client.find<TxCreateDoc<Doc>>(
|
||||
DOMAIN_TX,
|
||||
@ -84,6 +85,7 @@ async function fillCreatedBy (client: MigrationClient): Promise<void> {
|
||||
)
|
||||
} catch (err) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
export const coreOperation: MigrateOperation = {
|
||||
async migrate (client: MigrationClient): Promise<void> {
|
||||
|
Loading…
Reference in New Issue
Block a user