mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-05 09:00:07 +00:00
Merge pull request #11629 from overleaf/msm-exit-migrate-history
[web/scripts] force exit on `migrate_history.js` GitOrigin-RevId: 298568043c2885b8ad2c6242e7519faccf2f2498
This commit is contained in:
parent
8d1ea82ad3
commit
df3aff9c66
1 changed files with 9 additions and 6 deletions
|
@ -100,11 +100,7 @@ async function migrateProjects(projectsToMigrate) {
|
|||
console.error(err)
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Migration complete')
|
||||
console.log('==================')
|
||||
console.log('Projects migrated: ', projectsMigrated)
|
||||
console.log('Projects failed: ', projectsFailed)
|
||||
return { projectsMigrated, projectsFailed }
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
@ -113,8 +109,15 @@ async function main() {
|
|||
console.log('Dry run, exiting')
|
||||
process.exit(0)
|
||||
}
|
||||
await migrateProjects(projectsToMigrate)
|
||||
const { projectsMigrated, projectsFailed } = await migrateProjects(
|
||||
projectsToMigrate
|
||||
)
|
||||
console.log('Migration complete')
|
||||
console.log('==================')
|
||||
console.log('Projects migrated: ', projectsMigrated)
|
||||
console.log('Projects failed: ', projectsFailed)
|
||||
console.log('Done.')
|
||||
process.exit(projectsFailed > 0 ? 1 : 0)
|
||||
}
|
||||
|
||||
waitForDb()
|
||||
|
|
Loading…
Reference in a new issue