mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 10:00:47 -05:00
909bb99b9f
* [CE/SP] Flush redis on `docker stop` * Extracted `limit` to variable Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com> * Increased logging --------- Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com> GitOrigin-RevId: 4bcb4e70988337369acca0e80f243609bd6323ed
25 lines
532 B
JavaScript
25 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)
|
|
})
|