mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
make unarchive more responsive by downloading documents in parallel
unarchive is triggered interactively so we should try to make it reasonably fast
This commit is contained in:
@@ -47,7 +47,7 @@ module.exports = DocArchiveManager =
|
||||
return callback new Error("No docs for project #{project_id}")
|
||||
jobs = _.map docs, (doc) ->
|
||||
(cb)-> DocArchiveManager.unArchiveDocChanges project_id, doc._id, cb
|
||||
async.series jobs, callback
|
||||
async.parallelLimit jobs, 4, callback
|
||||
|
||||
unArchiveDocChanges: (project_id, doc_id, callback)->
|
||||
MongoManager.getArchivedDocChanges doc_id, (error, count) ->
|
||||
|
||||
Reference in New Issue
Block a user