Skip to content
loading...

How I make a Laravel Job to fail without restarting so I can use sentry to log the exception?

pcmagas profile image Dimitrios Desyllas github logo ・1 min read  

I want to be able to log exceptions into sentry but in a manner that also won't make my job to spawn like an overlord's minion.

In my multi-server application I use laravel's Queueing system in order to run background jobs. Sometimes in my logic I want to make my job to throw an exception so I can log it via a sentry using the laravel library that offers.

So in my job:

namespace App\Jobs;

use

Can you help me with that?

twitter logo DISCUSS
Discussion
markdown guide
Classic DEV Post from Jul 27 '19

If You Don't Know, Now You Know - GitHub Is Restricting Access For Users From Iran And A Few Other Embargoed Countries

Please help our cause against modern-day discrimination

Dimitrios Desyllas profile image
Greedings I am Dimitrios Desyllas aka pc_magas. I am a php software engineer in e-table. I am interested in electron, C++, privacy enhancing terchnologies and cryptography