mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 13:31:28 +00:00
Merge pull request #11541 from overleaf/bg-fix-doUpgradeForNoneWithoutConversion
clear redis before migrating projects without history GitOrigin-RevId: 9f1ba14f6a7c5d6a7f1a55fcfeb3778b15a84561
This commit is contained in:
parent
78304e7c94
commit
e9c0f4363a
1 changed files with 6 additions and 0 deletions
|
@ -7,6 +7,7 @@ const HistoryManager = require('../../../../app/src/Features/History/HistoryMana
|
|||
const ProjectHistoryController = require('./ProjectHistoryController')
|
||||
const ProjectEntityHandler = require('../../../../app/src/Features/Project/ProjectEntityHandler')
|
||||
const ProjectEntityUpdateHandler = require('../../../../app/src/Features/Project/ProjectEntityUpdateHandler')
|
||||
const DocumentUpdaterHandler = require('../../../../app/src/Features/DocumentUpdater/DocumentUpdaterHandler')
|
||||
|
||||
// Timestamp of when 'Enable history for SL in background' release
|
||||
const ID_WHEN_FULL_PROJECT_HISTORY_ENABLED = '5a8d8a370000000000000000'
|
||||
|
@ -196,6 +197,11 @@ async function doUpgradeForNoneWithoutConversion(project) {
|
|||
await ProjectHistoryHandler.promises.setHistoryId(projectId, historyId)
|
||||
}
|
||||
}
|
||||
// tell document updater to clear the docs, they will be reloaded with any new history id
|
||||
await DocumentUpdaterHandler.promises.flushProjectToMongoAndDelete(
|
||||
projectId
|
||||
)
|
||||
// now resync the project
|
||||
await HistoryManager.promises.resyncProject(projectId, {
|
||||
force: true,
|
||||
origin: { kind: 'history-migration' },
|
||||
|
|
Loading…
Reference in a new issue