添加日志记录以跟踪打印推送的开始和结束

This commit is contained in:
mkm 2024-05-25 15:42:59 +08:00
parent fa6756a9c9
commit c121603686

View File

@ -32,6 +32,7 @@ class PushPlatformPrintSend implements Consumer
public function consume($data)
{
$id=$data['order_id']??0;
Log::info('打印推送开始'.$id);
if(!$id)return false;
$find = Cashierclass::where('id', $id)->where('is_print',0)->field('id,merchant,real_name,user_phone,user_address,uid,number,total,actual,create_time')->find();
if ($find) {
@ -51,6 +52,8 @@ class PushPlatformPrintSend implements Consumer
return $item;
});
PushService::push('platform_1', 1, ['type'=>'platform_print','msg'=>'打印队列','data'=>$find]);
Log::info('打印推送结束'.$id);
}
}
public function onConsumeFailure(\Throwable $exception, $package)