iriscouch / follow

Very stable, very reliable, NodeJS CouchDB _changes follower
Apache License 2.0
393 stars 82 forks source link

It is safe to change feed.db after an error? #37

Open revington opened 11 years ago

revington commented 11 years ago

I want to use follow to listen changes from a couchdb server. If that server dies, I want to follow the changes from a replica.

Code is something like this:

feed.on('retry', function(){                               
      feed.db = getTheNewServerToFollow();
});

Do you think it is correct? Do you think there is a better approach?