overleaf/services/clsi/app/coffee/DbQueue.coffee

14 lines
283 B
CoffeeScript
Raw Normal View History

async = require "async"
Settings = require "settings-sharelatex"
2019-03-22 16:42:06 -04:00
logger = require("logger-sharelatex")
queue = async.queue((task, cb)->
task(cb)
, Settings.parallelSqlQueryLimit)
queue.drain = ()->
2019-03-22 16:42:06 -04:00
logger.debug('all items have been processed')
module.exports =
queue: queue