Commit 50caa15f by 宋毅

tj

parent 6bc07855
......@@ -22,9 +22,9 @@ class ConsumerBase {
}
var self = this;
this.duplicateInstance.brpop(queuedName, 3600, async function (err, repl) {
console.log(JSON.stringify(repl), "..............repl.............." + queuedName);
console.log(JSON.stringify(repl), "..............repl.....info........." + queuedName);
if (err) {
return new Error('doConsumer brpop error :' + err);
return new Error("queuedName=" + queuedName + "doConsumer brpop error :" + err);
}
else {
if (repl[1]) {
......@@ -34,10 +34,10 @@ class ConsumerBase {
}
});
} catch (error) {
//日志
var stackStr = error.stack ? error.stack : JSON.stringify(error);
console.log(stackStr, ",队列执行doConsumer存在异常queuedName=" + queuedName);
this.errorLogDao.addOpErrorLogs("队列执行doConsumer存在异常", null, null, stackStr, 3);
//日志
console.log(stackStr, ",队列执行doConsumer存在异常");
}
}
......@@ -87,10 +87,10 @@ class ConsumerBase {
if (execResult && execResult.status == 1) {
await this.pushSuccessLogDao.addOpSuccessLogs("推送成功", actionBody, execResult);
} else {
//日志记录
var stackStr = error.stack ? error.stack : JSON.stringify(error);
console.log(stackStr, ",队列执行execSubDoConsumer存在异常queuedName=" + queuedName);
this.errorLogDao.addOpErrorLogs("队列执行execSubDoConsumer存在异常", actionBody, execResult, stackStr, 3);
//日志记录
console.log(stackStr, ",队列执行execSubDoConsumer存在异常");
}
}
}
......@@ -159,3 +159,5 @@ class ConsumerBase {
}
}
module.exports = ConsumerBase;
var stackStr = error.stack ? error.stack : JSON.stringify(error);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment