Browse Source

make unarchive more responsive by downloading documents in parallel

unarchive is triggered interactively so we should try to make it
reasonably fast
Brian Gough 11 years ago
parent
commit
82d0f4fce8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      services/track-changes/app/coffee/DocArchiveManager.coffee

+ 1 - 1
services/track-changes/app/coffee/DocArchiveManager.coffee

@@ -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) ->