MQ edit
This commit is contained in:
@@ -39,6 +39,7 @@ use support\Redis;
|
||||
$data = $msg->body;
|
||||
Log::info('MQ收到消息[商品状态更新]--->' . $data . '--->' . $date_time . "\n");
|
||||
$datInfo= json_decode($data, true);
|
||||
if(is_array($datInfo)) {
|
||||
// 如果是数字。则打印订单
|
||||
$is_log = false;
|
||||
$curl_error = '';
|
||||
@@ -69,6 +70,7 @@ use support\Redis;
|
||||
'err_info' => $curl_error,
|
||||
]);
|
||||
}
|
||||
}
|
||||
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
|
||||
};
|
||||
$rabbit_channel->basic_consume($queue, '', false, false, false, false, $callback);
|
||||
|
||||
Reference in New Issue
Block a user