Merge pull request #8780 from overleaf/bg-import-zip-file-for-migration

import track-changes zip file from disk for history migration

GitOrigin-RevId: cb1d7f57e60ea6f627e63753c22f2ffc7e3b79ac
This commit is contained in:
Brian Gough 2022-07-11 09:11:20 +01:00 committed by Copybot
parent a822819582
commit 73f85d6e51

View file

@ -12,6 +12,7 @@ const ARCHIVE_ON_FAILURE = process.env.ARCHIVE_ON_FAILURE === 'true'
const FIX_INVALID_CHARACTERS = process.env.FIX_INVALID_CHARACTERS === 'true' const FIX_INVALID_CHARACTERS = process.env.FIX_INVALID_CHARACTERS === 'true'
const FORCE_NEW_HISTORY_ON_FAILURE = const FORCE_NEW_HISTORY_ON_FAILURE =
process.env.FORCE_NEW_HISTORY_ON_FAILURE === 'true' process.env.FORCE_NEW_HISTORY_ON_FAILURE === 'true'
const IMPORT_ZIP_FILE_PATH = process.env.IMPORT_ZIP_FILE_PATH
// persist fallback in order to keep batchedUpdate in-sync // persist fallback in order to keep batchedUpdate in-sync
process.env.BATCH_SIZE = BATCH_SIZE process.env.BATCH_SIZE = BATCH_SIZE
@ -48,6 +49,7 @@ console.log({
FORCE_NEW_HISTORY_ON_FAILURE, FORCE_NEW_HISTORY_ON_FAILURE,
CONVERT_LARGE_DOCS_TO_FILE, CONVERT_LARGE_DOCS_TO_FILE,
USER_ID, USER_ID,
IMPORT_ZIP_FILE_PATH,
}) })
const RESULT = { const RESULT = {
@ -140,6 +142,7 @@ async function doUpgradeForNoneWithConversion(project) {
archiveOnFailure: ARCHIVE_ON_FAILURE, archiveOnFailure: ARCHIVE_ON_FAILURE,
fixInvalidCharacters: FIX_INVALID_CHARACTERS, fixInvalidCharacters: FIX_INVALID_CHARACTERS,
forceNewHistoryOnFailure: FORCE_NEW_HISTORY_ON_FAILURE, forceNewHistoryOnFailure: FORCE_NEW_HISTORY_ON_FAILURE,
importZipFilePath: IMPORT_ZIP_FILE_PATH,
}) })
} catch (err) { } catch (err) {
// if migrateProjectHistory fails, it cleans up by deleting // if migrateProjectHistory fails, it cleans up by deleting