2020-02-19 11:14:28 +00:00
|
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
|
|
// Sanity-check the conversion and remove this comment.
|
2020-02-19 11:14:14 +00:00
|
|
|
/*
|
|
|
|
* decaffeinate suggestions:
|
|
|
|
* DS102: Remove unnecessary code created because of implicit returns
|
|
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
|
|
*/
|
2020-02-19 11:14:37 +00:00
|
|
|
const async = require('async')
|
2021-07-12 16:47:21 +00:00
|
|
|
const Settings = require('@overleaf/settings')
|
2022-03-01 15:09:36 +00:00
|
|
|
const logger = require('@overleaf/logger')
|
2020-02-19 11:14:37 +00:00
|
|
|
const queue = async.queue(
|
|
|
|
(task, cb) => task(cb),
|
|
|
|
Settings.parallelSqlQueryLimit
|
|
|
|
)
|
2018-07-30 15:46:47 +00:00
|
|
|
|
2022-06-21 08:07:14 +00:00
|
|
|
queue.drain(() => logger.debug('all items have been processed'))
|
2018-07-30 15:46:47 +00:00
|
|
|
|
2020-02-19 11:14:37 +00:00
|
|
|
module.exports = { queue }
|