Reputation: 13
I need queue job to re-run if it failed. I set $tries = 3
but I need to know if in job I catch exception is this will be considered as filed job and will be re-run?
Upvotes: 0
Views: 233
Reputation: 3845
The way a Laravel job knows if a jobs has failed is one of the following two:
throw new \RuntimeException('something went wrong');
return -2;
)I posted a more elaborate answer here
Upvotes: 1