我有一個用laravel編寫的工作項目,我已經集成了Sentry來監視錯誤,我按照他們網站上的說明進行操作,基本上作曲者需要哨兵/哨兵laravel并在我的App / Exceptions / Handler.php中if (app()->bound('sentry') && $this->shouldReport($exception)) { app('sentry')->captureException($exception);}現在,這可以正常工作,我看到了哨兵中的錯誤。但是在應用程序的另一端,無論我在哪里使用隊列,例如,我都有“忘記密碼”通知,并且它實際上實現了ShouldQueue類:<?phpnamespace App\Notifications\Auth;use Illuminate\Bus\Queueable;use Illuminate\Notifications\Notification;use Illuminate\Contracts\Queue\ShouldQueue;use Illuminate\Notifications\Messages\MailMessage;class PasswordResetRequest extends Notification implements ShouldQueue{ use Queueable; protected $token; public function __construct($token) { $this->token = $token; } public function via($notifiable) { return ['mail']; } public function toMail($notifiable) { $url = url('/password/find/'.$this->token); return (new MailMessage) ->line('You are receiving this email because we received a password reset request for your account.') ->action('Reset Password', url($url)) ->line('If you did not request a password reset, no further action is required.'); }}并且當觸發按預期工作時,我在作業表中有一條新記錄(我有數據庫作為隊列驅動程序)現在,當我開始我的工人PHP的工匠隊列:工作它停頓了,它一遍又一遍地工作沒有發送或接收的郵件...順便說一下,這僅當我在哨兵中進行報告時,如果我在report()方法中刪除了App / Exceptions / Handler.php中的那些行,那一切都很好,如果我從通知中刪除隊列,它也能正常工作,那么僅是哨兵的組合錯誤報告和通知排隊使我成為一個大問題。
- 1 回答
- 0 關注
- 201 瀏覽
添加回答
舉報
0/150
提交
取消