overleaf/services/clsi/app/coffee/DbQueue.coffee
2019-03-22 20:42:26 +00:00

13 lines
283 B
CoffeeScript

async = require "async"
Settings = require "settings-sharelatex"
logger = require("logger-sharelatex")
queue = async.queue((task, cb)->
task(cb)
, Settings.parallelSqlQueryLimit)
queue.drain = ()->
logger.debug('all items have been processed')
module.exports =
queue: queue