mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
snapshot tweaks
This commit is contained in:
committed by
Nick Martin
parent
d56725dd6a
commit
ad4f4ffa5a
@@ -377,11 +377,6 @@ _Mongo.LiveResultsSet = function (cursor, options) {
|
||||
// expose collection name
|
||||
self.collection_name = cursor.collection_name;
|
||||
|
||||
// unique handle for this live query
|
||||
self.cursor.mongo.next_observer_id =
|
||||
self.cursor.mongo.next_observer_id || 0; // XXX added by dgreenspan
|
||||
self.qid = self.cursor.mongo.next_observer_id++;
|
||||
|
||||
// previous results snapshot. on each poll cycle, diffs against
|
||||
// results drives the callbacks.
|
||||
self.results = [];
|
||||
@@ -457,10 +452,10 @@ _Mongo.LiveResultsSet.prototype._unthrottled_markDirty = function () {
|
||||
}).run();
|
||||
};
|
||||
|
||||
// interface for tests to control when polling happens
|
||||
_Mongo.LiveResultsSet.prototype._suspendPolling = function() {
|
||||
this.polling_suspended = true;
|
||||
};
|
||||
|
||||
_Mongo.LiveResultsSet.prototype._resumePolling = function() {
|
||||
this.polling_suspended = false;
|
||||
this._unthrottled_markDirty(); // poll NOW, don't wait
|
||||
|
||||
Reference in New Issue
Block a user