I want to show you how to delay job execution and retry jobs conditionally when working with Laravel queues.
Delay Start Of A Laravel Job
Sometimes you need to schedule a job to run in the future rather than immediately. For example, after a user registers, you might want to send a notification after some time.
When dispatching a job, you can chain a delay method which accepts a parameter - you can even use Carbon for more readable time expressions.
In this example, the job will be processed after 15 minutes, but in reality, it could take...
Would an early return work better here? does the job skips the rest of the code when encountring a $this->release()?
if (is_null($this->user->email_verified_at)) { $this->release(); }
// rest of the code
In this case I think it would work, only thing you should need to add a
return;. To check you could quickly try it