Notify on queue errors
This commit is contained in:
parent
d854269228
commit
be10b80fbf
1 changed files with 8 additions and 0 deletions
|
|
@ -153,6 +153,14 @@ class InvoiceListener
|
|||
|
||||
public function jobFailed(JobExceptionOccurred $exception)
|
||||
{
|
||||
if ($errorEmail = env('ERROR_EMAIL')) {
|
||||
\Mail::raw(print_r($exception->data, true), function ($message) use ($errorEmail) {
|
||||
$message->to($errorEmail)
|
||||
->from(CONTACT_EMAIL)
|
||||
->subject('Job failed');
|
||||
});
|
||||
}
|
||||
|
||||
Utils::logError($exception->exception);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue