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:
Jakob Ackermann
2024-11-01 09:05:15 +00:00
committed by Copybot
parent 7b3e39f63f
commit a7517eefcb
75 changed files with 124 additions and 270 deletions
-2
View File
@@ -8,7 +8,6 @@ import path from 'path'
import _ from 'lodash'
import parseArgs from 'minimist'
import OError from '@overleaf/o-error'
import { waitForDb } from '../app/src/infrastructure/mongodb.js'
import { User } from '../app/src/models/User.js'
import ProjectCreationHandler from '../app/src/Features/Project/ProjectCreationHandler.js'
import ProjectEntityUpdateHandler from '../app/src/Features/Project/ProjectEntityUpdateHandler.js'
@@ -207,7 +206,6 @@ async function _applyRandomDocUpdate(ownerId, projectId) {
}
async function createProject() {
await waitForDb()
const user = await User.findById(userId)
console.log('Will create project')
console.log('user_id:', userId, '=>', user.email)