node-q-pool
v12.0.0
Published
The `node-q` module seems to be losing its connection or for some reason returning `undefined` from queries after a random amount of time. This goes away when the server is restarted. This is a workaround that creates a pool with new connections every 3
Downloads
3
Readme
The node-q
module seems to be losing its connection or for some reason returning undefined
from
queries after a random amount of time. This goes away when the server is restarted.
This is a workaround that creates a pool with new connections every 30 seconds, so there can't be any
stale connections that don't work.
Supports k for querying with a connection it from a pool. Also handles ks (without parameters).
var qpool = require('node-q-pool');
qpool.getConnection({{host: "localhost", port: 5000}, function(err, con) {
if (err) throw err;
con.k("sum 1 2 3", function(err, res) {
if (err) throw err;
console.log("result", res); // 6
});
});