args
args
?
const res = await this.r.table('products').insert(item, {
conflict: (id, oldDoc, newDoc) => {
return Object.assign(item, oldDoc.merge(newDoc.without("createdAt")));
},
returnChanges: true
})
.run(this.conn);
r.connect({host: 'IP', port: 28015, db: 'myDB'}, function (err, conn) {
if (err) throw err;
r.table('devices').getField('display').filter({url: 'someValue'}).run(conn, function (err, cursor) {
// How to get the result from here???
})
});
I added the following event to my node script
db.getPoolMaster().on('healthy', function(healthy) {
if (healthy) {
console.log('########## HEALTLY ############');
console.log('OPENED CONN: ' , db.getPoolMaster().getLength());
console.log('AVAILABLE CONN: ' , db.getPoolMaster().getAvailableLength());
}
else {
console.log('!!!!!!!!!!! UNHEALTLY !!!!!!!!!');
console.log('OPENED CONN: ' , db.getPoolMaster().getLength());
console.log('AVAILABLE CONN: ' , db.getPoolMaster().getAvailableLength());
}
});
however , calling the API locally , never display any of these logs.
Is it possible that the db state doesn't ever change?