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')
|
|
|
|
const Settings = require('settings-sharelatex')
|
|
|
|
const logger = require('logger-sharelatex')
|
|
|
|
const queue = async.queue(
|
|
|
|
(task, cb) => task(cb),
|
|
|
|
Settings.parallelSqlQueryLimit
|
|
|
|
)
|
2018-07-30 15:46:47 +00:00
|
|
|
|
2020-02-19 11:14:37 +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 }
|