mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-15 05:11:57 +00:00
make archive and unarchive parallelLimit to speed it up
This commit is contained in:
parent
9cfa4b3f84
commit
f1bf0c97ec
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ module.exports = DocArchive =
|
|||
jobs = _.map docs, (doc) ->
|
||||
(cb)->
|
||||
DocArchive.archiveDoc project_id, doc, cb
|
||||
async.series jobs, callback
|
||||
async.parallelLimit jobs, 5, callback
|
||||
|
||||
|
||||
archiveDoc: (project_id, doc, callback)->
|
||||
|
@ -52,7 +52,7 @@ module.exports = DocArchive =
|
|||
return cb()
|
||||
else
|
||||
DocArchive.unarchiveDoc project_id, doc._id, cb
|
||||
async.series jobs, callback
|
||||
async.parallelLimit jobs, 5, callback
|
||||
|
||||
unarchiveDoc: (project_id, doc_id, callback)->
|
||||
logger.log project_id: project_id, doc_id: doc_id, "getting doc from s3"
|
||||
|
|
Loading…
Reference in a new issue