Navigation Menu

Skip to content
This repository has been archived by the owner on Sep 3, 2019. It is now read-only.

Commit

Permalink
remove support for legacy couchdb and pouchdb-server db_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lupomontero committed Apr 24, 2015
1 parent 002cbad commit 466c354
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions server/changes.js
Expand Up @@ -9,7 +9,6 @@ module.exports = function (capot, cb) {
var changesDb = couch.db('changes');
var feed = capot.changes = new events.EventEmitter();
var since = {};
var legacyDbUpdates = false;


feed.start = function () {
Expand Down Expand Up @@ -55,22 +54,7 @@ module.exports = function (capot, cb) {


function listen() {
// PouchDB and old CouchDB dont support /_db_updates.
if (legacyDbUpdates) {
return getAllChanges(function () {
setTimeout(listen, 10 * 1000);
});
}

couch.get('/_db_updates', function (err, data) {
if (err && err.statusCode === 400) {
legacyDbUpdates = true;
setTimeout(listen, 10 * 1000);
return;
} else if (err) {
console.error(err);
}

// Immediately listen for more changes.
listen();

Expand Down

0 comments on commit 466c354

Please sign in to comment.