5
node.jsでmysqlクエリのタイムアウトを設定するにはどうすればよいですか?Node.js - mysqlクエリのタイムアウト
/*...*/
var mysql = require("mysql");
/* ...*/
app.get("/", function(req, res) {
connection.query("SELECT ...", function(err, rows, fields) {
/* I want this query to fail if the ^_ callback is not invoked within x seconds */
});
}
ありがとうございます。それでは、代替案は何でしょうか?タイムアウト機能がなければ、モジュールは生産には適していないようです。 –