Reputation: 135
I have a number of jobs on my queue table. I want to run a job until fail. After that job, the queue polls next job.
Currently Laravel Queue pulls all jobs to run row by row. But I don't want to pull next job unless first job is succeed.
Upvotes: 1
Views: 1262
Reputation: 5230
If you can detect if your first job is done or not, you can use:
$this->release(10);
inside the job to release the job 10 seconds if the first is not finished.
This way allows you to process a job if you want or not and return to the queue if it's necessary.
Upvotes: 1