Laravel 在队列中,要是有抛出异常,直接进入失败队列,这个不太符合逻辑啊,你们怎么处理?
public function handle()
{
$orderTap = new OrderTap($this->account, $this->task);
try {
//$orderTap->tap(); // 如果抛出异常,说明当前活动不符合需求
throw new \Exception("Error Processing Request", 1);
//$orderTap->createOrder();
//event(new \App\Events\Notification($account, '接单成功', 1));
}catch(\Exceptions $e){
die('test');
event(new \App\Events\Notification($account, $e->message, 0));
}
}
相当于说,die(‘test’)是永远无法执行的,这种做法很不科学啊,怎和以会这样
推荐文章: