mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01: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:
@@ -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' },
|
||||
|
||||
Reference in New Issue
Block a user