Commit 86a4b2af by 王召彬

cmq日志记录执行状态

parent d49bec31
...@@ -267,22 +267,24 @@ class Topic ...@@ -267,22 +267,24 @@ class Topic
} }
$tryTimes++; $tryTimes++;
} while ($tryTimes < 3); } while ($tryTimes < 3);
$status = 0;
if ($tryTimes >= 3) { if ($tryTimes >= 3) {
$status = 1;
App::error("[消息队列失败]:$message"); App::error("[消息队列失败]:$message");
} }
$this->TopicLog($message, $cryptMessage, $vTagList, $res); $this->TopicLog($message, $cryptMessage, $vTagList, $res, $status);
return $res; return $res;
} }
protected function TopicLog($message, $cryptMessage, $tagName, $response) protected function TopicLog($message, $cryptMessage, $tagName, $response, $status=0)
{ {
$data = [ $data = [
'tagName' => $tagName, 'tagName' => $tagName,
'topName' => $this->topic_name, 'topName' => $this->topic_name,
'message' => $message, 'message' => $message,
'cryptMessage' => $cryptMessage, 'cryptMessage' => $cryptMessage,
'status' => $status,
'createTime' => time(), 'createTime' => time(),
'response' => json_encode($response), 'response' => json_encode($response),
]; ];
......
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