mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
26 lines
532 B
JavaScript
26 lines
532 B
JavaScript
|
const UpdatesManager = require('../app/js/UpdatesManager')
|
||
|
|
||
|
async function main() {
|
||
|
return new Promise((resolve, reject) => {
|
||
|
const limit = -1
|
||
|
console.log('Flushing all updates')
|
||
|
UpdatesManager.flushAll(limit, err => {
|
||
|
if (err) {
|
||
|
reject(err)
|
||
|
} else {
|
||
|
resolve()
|
||
|
}
|
||
|
})
|
||
|
})
|
||
|
}
|
||
|
|
||
|
main()
|
||
|
.then(() => {
|
||
|
console.log('Done flushing all updates')
|
||
|
process.exit(0)
|
||
|
})
|
||
|
.catch(error => {
|
||
|
console.error('There was an error flushing updates', { error })
|
||
|
process.exit(1)
|
||
|
})
|