添加日志记录以跟踪打印推送的开始和结束
This commit is contained in:
parent
fa6756a9c9
commit
c121603686
@ -32,6 +32,7 @@ class PushPlatformPrintSend implements Consumer
|
|||||||
public function consume($data)
|
public function consume($data)
|
||||||
{
|
{
|
||||||
$id=$data['order_id']??0;
|
$id=$data['order_id']??0;
|
||||||
|
Log::info('打印推送开始'.$id);
|
||||||
if(!$id)return false;
|
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();
|
$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) {
|
if ($find) {
|
||||||
@ -51,6 +52,8 @@ class PushPlatformPrintSend implements Consumer
|
|||||||
return $item;
|
return $item;
|
||||||
});
|
});
|
||||||
PushService::push('platform_1', 1, ['type'=>'platform_print','msg'=>'打印队列','data'=>$find]);
|
PushService::push('platform_1', 1, ['type'=>'platform_print','msg'=>'打印队列','data'=>$find]);
|
||||||
|
Log::info('打印推送结束'.$id);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function onConsumeFailure(\Throwable $exception, $package)
|
public function onConsumeFailure(\Throwable $exception, $package)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user