は、私は、ライブラリを使用してマルチアトミックトランザクションを実行してい未処理の拒絶例外RangeError:モニタモードであるクライアントでトランザクションを使用するには、原因のRedis
、SOのための有効な質問のように思えますNode.jsのため、私のIBM Bluemixから私のログ結果のノード-Redisのは、私は次のエラーが表示されます
Unhandled rejection RangeError: Using transaction with a client that is in monitor mode does not work due to faulty return values of Redis.
は今ここに興味深い部分です、バグが私のスクリプト内で255行目に正確に指摘されている。
/* Code Above */
//
//
//
new Promise((resolve, reject)=>{
[LINE 255] client.multi().hget(practitioner, "texted").hget(practitioner, "replied")
.execAsync().then((replies)=>{
console.log(replies);
var _replied = replies[1],
_texted = replies[0];
if (_replied && _texted){
retrievalSuccess = `Practitioner ${practitioner} has sent a message to the NOK participant
\s ${contact.fname} ${contact.lname} at ${TimeStamper()},
\s participant returned SMS of OK
\s, closing..."`;
console.info(retrievalSuccess);
auditFile.message += "\n"+retrievalSuccess;
/* rest of the code */
私のルートは、すべてのエラーを投げていなかったまで、私は、コールバック
client.monitor((err, res)=>{
console.log("Entering monitoring mode.", res);
});
client.on("monitor", (time, args, raw_reply)=>{
console.log(time + ": " + args); // 1458910076.446514:['set', 'foo', 'bar']
});
モニタ機能は、サーバー上でこれらのトランザクションの2を処理することができませんにこのコードのスニペットを追加しましたか?私はまだこの文の前に.exec()
を実行することができますが、execAsync
がなぜログ文を受け取ることができず、ランタイムを中断させるのかという根本的な理由であるかどうかはわかりません。 Redisの-ノードあたり