mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-11 15:10:48 +02:00
Merge pull request #21427 from overleaf/jpa-populate-db-on-import
[web] populate db with collections on import, ahead of waitForDb() call GitOrigin-RevId: 7eb4cd61c2052187acd9947d7060f54d9822d314
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import fs from 'fs'
|
||||
import minimist from 'minimist'
|
||||
import readline from 'readline'
|
||||
import {
|
||||
db,
|
||||
ObjectId,
|
||||
waitForDb,
|
||||
} from '../../app/src/infrastructure/mongodb.js'
|
||||
import { db, ObjectId } from '../../app/src/infrastructure/mongodb.js'
|
||||
import DocstoreManagerModule from '../../app/src/Features/Docstore/DocstoreManager.js'
|
||||
|
||||
const { promises: DocstoreManager } = DocstoreManagerModule
|
||||
@@ -66,8 +62,6 @@ rl.on('close', async () => {
|
||||
|
||||
console.log(`Loaded Data for ${docCount} docs in ${projectCount} Projects`)
|
||||
|
||||
await waitForDb()
|
||||
|
||||
for (const projectId of Object.keys(orphanedDocs)) {
|
||||
await deleteOrphanedDocs(projectId, orphanedDocs[projectId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user