This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
node-task/node_modules/mysql2/examples/pool-test.js

13 lines
292 B
JavaScript
Raw Normal View History

2014-09-24 17:56:53 -04:00
var pool = require('../test/common').createPool();
setInterval(function() {
for (var i=0; i < 5; ++i) {
pool.getConnection(function(err, db) {
db.query("select sleep(0.5) as qqq", function(err, rows, fields) {
console.log(rows, fields);
db.end();
});
});
}
}, 1000);