Commit e30d011c authored by Ben Beltran's avatar Ben Beltran

Use changefeed instead of changeset

Changefeed is the name used by rethinkdb for the list of
changes
parent 8fe66072
......@@ -24,16 +24,6 @@ const internals = {
connection.use(rethinkDB.database);
return connection;
},
// Get a changeset for a table
async getChangeset(tableName, callback) {
const connection = await internals.getConnectionWithDatabase();
return RethinkDB.table(tableName).changes({
includeInitial: true
});
}
};
......
......@@ -8,9 +8,9 @@ const internals = {
kOrderKey: 'position',
kLimitAmount: 50,
// Get the changeset
// Get the changefeed
async getChangeset(callback) {
async getChangefeed(callback) {
const connection = await getConnectionWithDatabase();
RethinkDB.table(internals.kTableName)
......@@ -33,7 +33,7 @@ module.exports = {
subscribe(callback) {
internals.getChangeset((err, cursor) => {
internals.getChangefeed((err, cursor) => {
if (err) {
return console.error(err.stack || err.message || err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment