Explorar el Código

make unarchive more responsive by downloading documents in parallel

unarchive is triggered interactively so we should try to make it
reasonably fast
Brian Gough hace 11 años
padre
commit
82d0f4fce8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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) ->