Эх сурвалжийг харах

Implement project update getter methods

James Allen 12 жил өмнө
parent
commit
b7de4c9c6c

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

@@ -5,7 +5,7 @@ logger = require "logger-sharelatex"
 
 
 module.exports = DiffManager =
 module.exports = DiffManager =
 	getLatestDocAndUpdates: (project_id, doc_id, fromVersion, toVersion, callback = (error, content, version, updates) ->) ->
 	getLatestDocAndUpdates: (project_id, doc_id, fromVersion, toVersion, callback = (error, content, version, updates) ->) ->
-		UpdatesManager.getUpdatesWithUserInfo project_id, doc_id, from: fromVersion, to: toVersion, (error, updates) ->
+		UpdatesManager.getDocUpdatesWithUserInfo project_id, doc_id, from: fromVersion, to: toVersion, (error, updates) ->
 			return callback(error) if error?
 			return callback(error) if error?
 			DocumentUpdaterManager.getDocument project_id, doc_id, (error, content, version) ->
 			DocumentUpdaterManager.getDocument project_id, doc_id, (error, content, version) ->
 				return callback(error) if error?
 				return callback(error) if error?

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

@@ -39,7 +39,7 @@ module.exports = HttpController =
 		if req.query.limit?
 		if req.query.limit?
 			limit = parseInt(req.query.limit, 10)
 			limit = parseInt(req.query.limit, 10)
 
 
-		UpdatesManager.getSummarizedUpdates project_id, doc_id, to: to, limit: limit, (error, updates) ->
+		UpdatesManager.getSummarizedDocUpdates project_id, doc_id, to: to, limit: limit, (error, updates) ->
 			return next(error) if error?
 			return next(error) if error?
 			res.send JSON.stringify updates: updates
 			res.send JSON.stringify updates: updates
 
 

+ 18 - 1
services/track-changes/app/coffee/MongoManager.coffee

@@ -40,7 +40,7 @@ module.exports = MongoManager =
 			v:      update.v
 			v:      update.v
 		}, callback
 		}, callback
 
 
-	getUpdates:(doc_id, options = {}, callback = (error, updates) ->) ->
+	getDocUpdates:(doc_id, options = {}, callback = (error, updates) ->) ->
 		query = 
 		query = 
 			doc_id: ObjectId(doc_id.toString())
 			doc_id: ObjectId(doc_id.toString())
 		if options.from?
 		if options.from?
@@ -59,6 +59,23 @@ module.exports = MongoManager =
 
 
 		cursor.toArray callback
 		cursor.toArray callback
 
 
+	getProjectUpdates: (project_id, options = {}, callback = (error, updates) ->) ->
+		query = 
+			project_id: ObjectId(project_id.toString())
+
+		if options.before?
+			query["meta.end_ts"] = { $lt: options.before }
+
+		cursor = db.docHistory
+			.find( query )
+			.sort( "meta.end_ts": -1 )
+
+		if options.limit?
+			cursor.limit(options.limit)
+
+		cursor.toArray callback
+
 	ensureIndices: (callback = (error) ->) ->
 	ensureIndices: (callback = (error) ->) ->
 		db.docHistory.ensureIndex { doc_id: 1, v: 1 }, callback
 		db.docHistory.ensureIndex { doc_id: 1, v: 1 }, callback
+		db.docHistory.ensureIndex { project_id: 1, "meta.end_ts": 1 }, callback
 
 

+ 16 - 6
services/track-changes/app/coffee/UpdatesManager.coffee

@@ -64,19 +64,29 @@ module.exports = UpdatesManager =
 			callback
 			callback
 		)
 		)
 
 
-	getUpdates: (project_id, doc_id, options = {}, callback = (error, updates) ->) ->
+	getDocUpdates: (project_id, doc_id, options = {}, callback = (error, updates) ->) ->
 		UpdatesManager.processUncompressedUpdatesWithLock project_id, doc_id, (error) ->
 		UpdatesManager.processUncompressedUpdatesWithLock project_id, doc_id, (error) ->
 			return callback(error) if error?
 			return callback(error) if error?
-			MongoManager.getUpdates doc_id, options, callback
+			MongoManager.getDocUpdates doc_id, options, callback
 
 
-	getUpdatesWithUserInfo: (project_id, doc_id, options = {}, callback = (error, updates) ->) ->
-		UpdatesManager.getUpdates project_id, doc_id, options, (error, updates) ->
+	getDocUpdatesWithUserInfo: (project_id, doc_id, options = {}, callback = (error, updates) ->) ->
+		UpdatesManager.getDocUpdates project_id, doc_id, options, (error, updates) ->
 			return callback(error) if error?
 			return callback(error) if error?
 			UpdatesManager.fillUserInfo updates, (error, updates) ->
 			UpdatesManager.fillUserInfo updates, (error, updates) ->
 				return callback(error) if error?
 				return callback(error) if error?
 				callback null, updates
 				callback null, updates
 
 
-	getSummarizedUpdates: (project_id, doc_id, options = {}, callback = (error, updates) ->) ->
+	getProjectUpdates: (project_id, options = {}, callback = (error, updates) ->) ->
+		MongoManager.getProjectUpdates project_id, options, callback
+
+	getProjectUpdatesWithUserInfo: (project_id, options = {}, callback = (error, updates) ->) ->
+		UpdatesManager.getProjectUpdates project_id, options, (error, updates) ->
+			return callback(error) if error?
+			UpdatesManager.fillUserInfo updates, (error, updates) ->
+				return callback(error) if error?
+				callback null, updates
+
+	getSummarizedDocUpdates: (project_id, doc_id, options = {}, callback = (error, updates) ->) ->
 		options.limit ||= 25
 		options.limit ||= 25
 		summarizedUpdates = []
 		summarizedUpdates = []
 		to = options.to
 		to = options.to
@@ -97,7 +107,7 @@ module.exports = UpdatesManager =
 		to, desiredLength,
 		to, desiredLength,
 		callback = (error, summarizedUpdates, endOfDatabase) ->
 		callback = (error, summarizedUpdates, endOfDatabase) ->
 	) ->
 	) ->
-		UpdatesManager.getUpdatesWithUserInfo project_id, doc_id, { to: to, limit: 3 * desiredLength }, (error, updates) ->
+		UpdatesManager.getDocUpdatesWithUserInfo project_id, doc_id, { to: to, limit: 3 * desiredLength }, (error, updates) ->
 			return callback(error) if error?
 			return callback(error) if error?
 			if !updates? or updates.length == 0
 			if !updates? or updates.length == 0
 				endOfDatabase = true
 				endOfDatabase = true

+ 2 - 2
services/track-changes/test/unit/coffee/DiffManager/DiffManagerTests.coffee

@@ -25,7 +25,7 @@ describe "DiffManager", ->
 			@updates = [ "mock-update-1", "mock-update-2" ]
 			@updates = [ "mock-update-1", "mock-update-2" ]
 
 
 			@DocumentUpdaterManager.getDocument = sinon.stub().callsArgWith(2, null, @content, @version)
 			@DocumentUpdaterManager.getDocument = sinon.stub().callsArgWith(2, null, @content, @version)
-			@UpdatesManager.getUpdatesWithUserInfo = sinon.stub().callsArgWith(3, null, @updates)
+			@UpdatesManager.getDocUpdatesWithUserInfo = sinon.stub().callsArgWith(3, null, @updates)
 			@DiffManager.getLatestDocAndUpdates @project_id, @doc_id, @from, @to, @callback
 			@DiffManager.getLatestDocAndUpdates @project_id, @doc_id, @from, @to, @callback
 
 
 		it "should get the latest version of the doc", ->
 		it "should get the latest version of the doc", ->
@@ -34,7 +34,7 @@ describe "DiffManager", ->
 				.should.equal true
 				.should.equal true
 
 
 		it "should get the latest updates", ->
 		it "should get the latest updates", ->
-			@UpdatesManager.getUpdatesWithUserInfo
+			@UpdatesManager.getDocUpdatesWithUserInfo
 				.calledWith(@project_id, @doc_id, from: @from, to: @to)
 				.calledWith(@project_id, @doc_id, from: @from, to: @to)
 				.should.equal true
 				.should.equal true
 
 

+ 2 - 2
services/track-changes/test/unit/coffee/HttpController/HttpControllerTests.coffee

@@ -76,11 +76,11 @@ describe "HttpController", ->
 			@res =
 			@res =
 				send: sinon.stub()
 				send: sinon.stub()
 			@updates = ["mock-summarized-updates"]
 			@updates = ["mock-summarized-updates"]
-			@UpdatesManager.getSummarizedUpdates = sinon.stub().callsArgWith(3, null, @updates)
+			@UpdatesManager.getSummarizedDocUpdates = sinon.stub().callsArgWith(3, null, @updates)
 			@HttpController.getUpdates @req, @res, @next
 			@HttpController.getUpdates @req, @res, @next
 
 
 		it "should get the updates", ->
 		it "should get the updates", ->
-			@UpdatesManager.getSummarizedUpdates
+			@UpdatesManager.getSummarizedDocUpdates
 				.calledWith(@project_id, @doc_id, to: @to, limit: @limit)
 				.calledWith(@project_id, @doc_id, to: @to, limit: @limit)
 				.should.equal true
 				.should.equal true
 
 

+ 61 - 4
services/track-changes/test/unit/coffee/MongoManager/MongoManagerTests.coffee

@@ -134,7 +134,7 @@ describe "MongoManager", ->
 		it "should call the callback", ->
 		it "should call the callback", ->
 			@callback.called.should.equal true
 			@callback.called.should.equal true
 
 
-	describe "getUpdates", ->
+	describe "getDocUpdates", ->
 		beforeEach ->
 		beforeEach ->
 			@updates = ["mock-update"]
 			@updates = ["mock-update"]
 			@db.docHistory = {}
 			@db.docHistory = {}
@@ -148,7 +148,7 @@ describe "MongoManager", ->
 
 
 		describe "with a to version", ->
 		describe "with a to version", ->
 			beforeEach ->
 			beforeEach ->
-				@MongoManager.getUpdates @doc_id, from: @from, to: @to, @callback
+				@MongoManager.getDocUpdates @doc_id, from: @from, to: @to, @callback
 
 
 			it "should find the all updates between the to and from versions", ->
 			it "should find the all updates between the to and from versions", ->
 				@db.docHistory.find
 				@db.docHistory.find
@@ -172,7 +172,7 @@ describe "MongoManager", ->
 
 
 		describe "without a to version", ->
 		describe "without a to version", ->
 			beforeEach ->
 			beforeEach ->
-				@MongoManager.getUpdates @doc_id, from: @from, @callback
+				@MongoManager.getDocUpdates @doc_id, from: @from, @callback
 
 
 			it "should find the all updates after the from version", ->
 			it "should find the all updates after the from version", ->
 				@db.docHistory.find
 				@db.docHistory.find
@@ -187,7 +187,7 @@ describe "MongoManager", ->
 
 
 		describe "with a limit", ->
 		describe "with a limit", ->
 			beforeEach ->
 			beforeEach ->
-				@MongoManager.getUpdates @doc_id, from: @from, limit: @limit = 10, @callback
+				@MongoManager.getDocUpdates @doc_id, from: @from, limit: @limit = 10, @callback
 
 
 			it "should limit the results", ->
 			it "should limit the results", ->
 				@db.docHistory.limit
 				@db.docHistory.limit
@@ -195,3 +195,60 @@ describe "MongoManager", ->
 					.should.equal true
 					.should.equal true
 
 
 
 
+	describe "getDocUpdates", ->
+		beforeEach ->
+			@updates = ["mock-update"]
+			@db.docHistory = {}
+			@db.docHistory.find = sinon.stub().returns @db.docHistory
+			@db.docHistory.sort = sinon.stub().returns @db.docHistory
+			@db.docHistory.limit = sinon.stub().returns @db.docHistory
+			@db.docHistory.toArray = sinon.stub().callsArgWith(0, null, @updates)
+
+			@before = Date.now()
+
+		describe "with a before timestamp", ->
+			beforeEach ->
+				@MongoManager.getProjectUpdates @project_id, before: @before, @callback
+
+			it "should find the all updates before the timestamp", ->
+				@db.docHistory.find
+					.calledWith({
+						project_id: ObjectId(@project_id)
+						"meta.end_ts": { $lt: @before }
+					})
+					.should.equal true
+
+			it "should sort in descending version order", ->
+				@db.docHistory.sort
+					.calledWith("meta.end_ts": -1)
+					.should.equal true
+
+			it "should not limit the results", ->
+				@db.docHistory.limit
+					.called.should.equal false
+
+			it "should call the call back with the updates", ->
+				@callback.calledWith(null, @updates).should.equal true
+
+		describe "without a before timestamp", ->
+			beforeEach ->
+				@MongoManager.getProjectUpdates @project_id, {}, @callback
+
+			it "should find the all updates", ->
+				@db.docHistory.find
+					.calledWith({
+						project_id: ObjectId(@project_id)
+					})
+					.should.equal true
+
+			it "should call the call back with the updates", ->
+				@callback.calledWith(null, @updates).should.equal true
+
+		describe "with a limit", ->
+			beforeEach ->
+				@MongoManager.getProjectUpdates @project_id, before: @before, limit: @limit = 10, @callback
+
+			it "should limit the results", ->
+				@db.docHistory.limit
+					.calledWith(@limit)
+					.should.equal true

+ 54 - 15
services/track-changes/test/unit/coffee/UpdatesManager/UpdatesManagerTests.coffee

@@ -198,13 +198,13 @@ describe "UpdatesManager", ->
 		it "should call the callback", ->
 		it "should call the callback", ->
 			@callback.called.should.equal true
 			@callback.called.should.equal true
 
 
-	describe "getUpdates", ->
+	describe "getDocUpdates", ->
 		beforeEach ->
 		beforeEach ->
 			@updates = ["mock-updates"]
 			@updates = ["mock-updates"]
 			@options = { to: "mock-to", limit: "mock-limit" }
 			@options = { to: "mock-to", limit: "mock-limit" }
-			@MongoManager.getUpdates = sinon.stub().callsArgWith(2, null, @updates)
+			@MongoManager.getDocUpdates = sinon.stub().callsArgWith(2, null, @updates)
 			@UpdatesManager.processUncompressedUpdatesWithLock = sinon.stub().callsArg(2)
 			@UpdatesManager.processUncompressedUpdatesWithLock = sinon.stub().callsArg(2)
-			@UpdatesManager.getUpdates @project_id, @doc_id, @options, @callback
+			@UpdatesManager.getDocUpdates @project_id, @doc_id, @options, @callback
 
 
 		it "should process outstanding updates", ->
 		it "should process outstanding updates", ->
 			@UpdatesManager.processUncompressedUpdatesWithLock
 			@UpdatesManager.processUncompressedUpdatesWithLock
@@ -212,7 +212,7 @@ describe "UpdatesManager", ->
 				.should.equal true
 				.should.equal true
 
 
 		it "should get the updates from the database", ->
 		it "should get the updates from the database", ->
-			@MongoManager.getUpdates
+			@MongoManager.getDocUpdates
 				.calledWith(@doc_id, @options)
 				.calledWith(@doc_id, @options)
 				.should.equal true
 				.should.equal true
 
 
@@ -221,17 +221,17 @@ describe "UpdatesManager", ->
 				.calledWith(null, @updates)
 				.calledWith(null, @updates)
 				.should.equal true
 				.should.equal true
 
 
-	describe "getUpdatesWithUserInfo", ->
+	describe "getDocUpdatesWithUserInfo", ->
 		beforeEach ->
 		beforeEach ->
 			@updates = ["mock-updates"]
 			@updates = ["mock-updates"]
 			@options = { to: "mock-to", limit: "mock-limit" }
 			@options = { to: "mock-to", limit: "mock-limit" }
 			@updatesWithUserInfo = ["updates-with-user-info"]
 			@updatesWithUserInfo = ["updates-with-user-info"]
-			@UpdatesManager.getUpdates = sinon.stub().callsArgWith(3, null, @updates)
+			@UpdatesManager.getDocUpdates = sinon.stub().callsArgWith(3, null, @updates)
 			@UpdatesManager.fillUserInfo = sinon.stub().callsArgWith(1, null, @updatesWithUserInfo)
 			@UpdatesManager.fillUserInfo = sinon.stub().callsArgWith(1, null, @updatesWithUserInfo)
-			@UpdatesManager.getUpdatesWithUserInfo @project_id, @doc_id, @options, @callback
+			@UpdatesManager.getDocUpdatesWithUserInfo @project_id, @doc_id, @options, @callback
 
 
 		it "should get the updates", ->
 		it "should get the updates", ->
-			@UpdatesManager.getUpdates
+			@UpdatesManager.getDocUpdates
 				.calledWith(@project_id, @doc_id, @options)
 				.calledWith(@project_id, @doc_id, @options)
 				.should.equal true
 				.should.equal true
 
 
@@ -243,6 +243,45 @@ describe "UpdatesManager", ->
 		it "should return the updates with the filled details", ->
 		it "should return the updates with the filled details", ->
 			@callback.calledWith(null, @updatesWithUserInfo).should.equal true
 			@callback.calledWith(null, @updatesWithUserInfo).should.equal true
 
 
+	describe "getProjectUpdates", ->
+		beforeEach ->
+			@updates = ["mock-updates"]
+			@options = { before: "mock-before", limit: "mock-limit" }
+			@MongoManager.getProjectUpdates = sinon.stub().callsArgWith(2, null, @updates)
+			@UpdatesManager.getProjectUpdates @project_id, @options, @callback
+
+		it "should get the updates from the database", ->
+			@MongoManager.getProjectUpdates
+				.calledWith(@project_id, @options)
+				.should.equal true
+
+		it "should return the updates", ->
+			@callback
+				.calledWith(null, @updates)
+				.should.equal true
+
+	describe "getProjectUpdatesWithUserInfo", ->
+		beforeEach ->
+			@updates = ["mock-updates"]
+			@options = { before: "mock-before", limit: "mock-limit" }
+			@updatesWithUserInfo = ["updates-with-user-info"]
+			@UpdatesManager.getProjectUpdates = sinon.stub().callsArgWith(2, null, @updates)
+			@UpdatesManager.fillUserInfo = sinon.stub().callsArgWith(1, null, @updatesWithUserInfo)
+			@UpdatesManager.getProjectUpdatesWithUserInfo @project_id, @options, @callback
+
+		it "should get the updates", ->
+			@UpdatesManager.getProjectUpdates
+				.calledWith(@project_id, @options)
+				.should.equal true
+
+		it "should file the updates with the user info", ->
+			@UpdatesManager.fillUserInfo
+				.calledWith(@updates)
+				.should.equal true
+
+		it "should return the updates with the filled details", ->
+			@callback.calledWith(null, @updatesWithUserInfo).should.equal true
+
 	describe "_extendBatchOfSummarizedUpdates", ->
 	describe "_extendBatchOfSummarizedUpdates", ->
 		beforeEach ->
 		beforeEach ->
 			@to = 42
 			@to = 42
@@ -256,11 +295,11 @@ describe "UpdatesManager", ->
 				@existingSummarizedUpdates = ["summarized-updates-3"]
 				@existingSummarizedUpdates = ["summarized-updates-3"]
 				@summarizedUpdates = ["summarized-updates-3", "summarized-update-2", "summarized-update-1"]
 				@summarizedUpdates = ["summarized-updates-3", "summarized-update-2", "summarized-update-1"]
 				@UpdatesManager._summarizeUpdates = sinon.stub().returns(@summarizedUpdates)
 				@UpdatesManager._summarizeUpdates = sinon.stub().returns(@summarizedUpdates)
-				@UpdatesManager.getUpdatesWithUserInfo = sinon.stub().callsArgWith(3, null, @updates)
+				@UpdatesManager.getDocUpdatesWithUserInfo = sinon.stub().callsArgWith(3, null, @updates)
 				@UpdatesManager._extendBatchOfSummarizedUpdates @project_id, @doc_id, @existingSummarizedUpdates, @to, @limit, @callback
 				@UpdatesManager._extendBatchOfSummarizedUpdates @project_id, @doc_id, @existingSummarizedUpdates, @to, @limit, @callback
 
 
 			it "should get the updates", ->
 			it "should get the updates", ->
-				@UpdatesManager.getUpdatesWithUserInfo
+				@UpdatesManager.getDocUpdatesWithUserInfo
 					.calledWith(@project_id, @doc_id, { to: @to, limit: 3 * @limit })
 					.calledWith(@project_id, @doc_id, { to: @to, limit: 3 * @limit })
 					.should.equal true
 					.should.equal true
 
 
@@ -276,20 +315,20 @@ describe "UpdatesManager", ->
 			beforeEach ->
 			beforeEach ->
 				@updates = []
 				@updates = []
 				@UpdatesManager._summarizeUpdates = sinon.stub().returns(@summarizedUpdates)
 				@UpdatesManager._summarizeUpdates = sinon.stub().returns(@summarizedUpdates)
-				@UpdatesManager.getUpdatesWithUserInfo = sinon.stub().callsArgWith(3, null, @updates)
+				@UpdatesManager.getDocUpdatesWithUserInfo = sinon.stub().callsArgWith(3, null, @updates)
 				@UpdatesManager._extendBatchOfSummarizedUpdates @project_id, @doc_id, @existingSummarizedUpdates, @to, @limit, @callback
 				@UpdatesManager._extendBatchOfSummarizedUpdates @project_id, @doc_id, @existingSummarizedUpdates, @to, @limit, @callback
 
 
 			it "should call the callback with the summarized updates and true for end-of-database", ->
 			it "should call the callback with the summarized updates and true for end-of-database", ->
 				@callback.calledWith(null, @summarizedUpdates.slice(0, @limit), true).should.equal true
 				@callback.calledWith(null, @summarizedUpdates.slice(0, @limit), true).should.equal true
 
 
-	describe "getSummarizedUpdates", ->
+	describe "getSummarizedDocUpdates", ->
 		describe "when one batch of updates is enough to meet the limit", ->
 		describe "when one batch of updates is enough to meet the limit", ->
 			beforeEach ->
 			beforeEach ->
 				@to = 42
 				@to = 42
 				@limit = 2
 				@limit = 2
 				@updates = ["summarized-updates-3", "summarized-updates-2"]
 				@updates = ["summarized-updates-3", "summarized-updates-2"]
 				@UpdatesManager._extendBatchOfSummarizedUpdates = sinon.stub().callsArgWith(5, null, @updates)
 				@UpdatesManager._extendBatchOfSummarizedUpdates = sinon.stub().callsArgWith(5, null, @updates)
-				@UpdatesManager.getSummarizedUpdates @project_id, @doc_id, { to: @to, limit: @limit }, @callback
+				@UpdatesManager.getSummarizedDocUpdates @project_id, @doc_id, { to: @to, limit: @limit }, @callback
 
 
 			it "should get the batch of summarized updates", ->
 			it "should get the batch of summarized updates", ->
 				@UpdatesManager._extendBatchOfSummarizedUpdates
 				@UpdatesManager._extendBatchOfSummarizedUpdates
@@ -311,7 +350,7 @@ describe "UpdatesManager", ->
 					else
 					else
 						callback null, @firstBatch.concat(@secondBatch), false
 						callback null, @firstBatch.concat(@secondBatch), false
 				sinon.spy @UpdatesManager, "_extendBatchOfSummarizedUpdates"
 				sinon.spy @UpdatesManager, "_extendBatchOfSummarizedUpdates"
-				@UpdatesManager.getSummarizedUpdates @project_id, @doc_id, { to: @to, limit: @limit }, @callback
+				@UpdatesManager.getSummarizedDocUpdates @project_id, @doc_id, { to: @to, limit: @limit }, @callback
 
 
 			it "should get the first batch of summarized updates", ->
 			it "should get the first batch of summarized updates", ->
 				@UpdatesManager._extendBatchOfSummarizedUpdates
 				@UpdatesManager._extendBatchOfSummarizedUpdates
@@ -332,7 +371,7 @@ describe "UpdatesManager", ->
 				@limit = 4
 				@limit = 4
 				@updates =  [{ toV: 6, fromV: 6 }, { toV: 5, fromV: 5 }]
 				@updates =  [{ toV: 6, fromV: 6 }, { toV: 5, fromV: 5 }]
 				@UpdatesManager._extendBatchOfSummarizedUpdates = sinon.stub().callsArgWith(5, null, @updates, true)
 				@UpdatesManager._extendBatchOfSummarizedUpdates = sinon.stub().callsArgWith(5, null, @updates, true)
-				@UpdatesManager.getSummarizedUpdates @project_id, @doc_id, { to: @to, limit: @limit }, @callback
+				@UpdatesManager.getSummarizedDocUpdates @project_id, @doc_id, { to: @to, limit: @limit }, @callback
 
 
 			it "should get the batch of summarized updates", ->
 			it "should get the batch of summarized updates", ->
 				@UpdatesManager._extendBatchOfSummarizedUpdates
 				@UpdatesManager._extendBatchOfSummarizedUpdates