mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #9864 from overleaf/msm-fix-audit-log
[scripts] fix audit log migration script GitOrigin-RevId: a7e32217385ac66a899e34eb3e0e8373bc802944
This commit is contained in:
@@ -89,10 +89,12 @@ async function processUsersBatch(users, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await promiseMapWithLimit(options.writeConcurrency, users, async user => {
|
await promiseMapWithLimit(options.writeConcurrency, users, async user => {
|
||||||
const projects = await db.projects.find(
|
const projects = await db.projects
|
||||||
{ owner_ref: user._id, auditLog: { $exists: true } },
|
.find(
|
||||||
{ _id: 1, auditLog: 1 }
|
{ owner_ref: user._id, auditLog: { $exists: true } },
|
||||||
)
|
{ _id: 1, auditLog: 1 }
|
||||||
|
)
|
||||||
|
.toArray()
|
||||||
await processProjectsBatch(projects, options)
|
await processProjectsBatch(projects, options)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user