mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
a450a74351
* Revert "Revert "Bump async to 3.2.2 (#7618)"" This reverts commit 75153a555211d654744c2e61e27fe21085826c22. * [web] fix usage of async.queue.drain in script * [clsi] fix usage of async.queue.drain * [spelling] fix usage of async.queue.drain * [redis-wrapper] fix usage of async.queue.drain * [web] Test that LockManager queue is cleared This protects against a regression found when upgrading the async package. Here we test that the `queue.drain` callback is really getting called, and the lock is being removed from the LOCK_QUEUES map. * [redis-wrapper] Upgrade async to 3.2.2 GitOrigin-RevId: df921e6d7f1d505bd467f22e58600ba1aff48869
18 lines
609 B
JavaScript
18 lines
609 B
JavaScript
// TODO: This file was created by bulk-decaffeinate.
|
|
// Sanity-check the conversion and remove this comment.
|
|
/*
|
|
* decaffeinate suggestions:
|
|
* DS102: Remove unnecessary code created because of implicit returns
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
*/
|
|
const async = require('async')
|
|
const Settings = require('@overleaf/settings')
|
|
const logger = require('@overleaf/logger')
|
|
const queue = async.queue(
|
|
(task, cb) => task(cb),
|
|
Settings.parallelSqlQueryLimit
|
|
)
|
|
|
|
queue.drain(() => logger.debug('all items have been processed'))
|
|
|
|
module.exports = { queue }
|