Permalink
Browse files

New disable-oplog package

  • Loading branch information...
1 parent 38e83bb commit 880cf37a3f101c6aa36e8e3b77b5b8901cf3893a @glasser glasser committed Dec 4, 2013
View
1 packages/disable-oplog/.gitignore
@@ -0,0 +1 @@
+.build*
View
6 packages/disable-oplog/package.js
@@ -0,0 +1,6 @@
+Package.describe({
+ summary: "Disables oplog tailing",
+ internal: true
+});
+
+// This package is empty; its presence is detected by mongo-livedata.
View
2 packages/mongo-livedata/mongo_driver.js
@@ -160,7 +160,7 @@ MongoConnection = function (url, options) {
self._docFetcher = new DocFetcher(self);
self._oplogHandle = null;
- if (options.oplogUrl) {
+ if (options.oplogUrl && !Package['disable-oplog']) {
var dbNameFuture = new Future;
self._withDb(function (db) {
dbNameFuture.return(db.databaseName);
View
5 packages/mongo-livedata/package.js
@@ -30,6 +30,11 @@ Package.on_use(function (api) {
// Allow us to detect 'autopublish', and publish collections if it's loaded.
api.use('autopublish', 'server', {weak: true});
+ // Allow us to detect 'disable-oplog', which turns off oplog tailing for your
+ // app even if it's configured in the environment. (This package will be
+ // probably be removed before 1.0.)
+ api.use('disable-oplog', 'server', {weak: true});
+
// defaultRemoteCollectionDriver gets its deployConfig from something that is
// (for questionable reasons) initialized by the webapp package.
api.use('webapp', 'server', {weak: true});

0 comments on commit 880cf37

Please sign in to comment.