Here's how I'm handling now, which requires the database driver. From within the job class:
$this->release(10);
DB::table('jobs')
->where('payload', $this->job->getRawBody())
->decrement('attempts');
So after releasing the job, I look for the newly created row by matching an identical payload, and then decrementing the attempts count again.
If my PR gets accepted, I'll be able to get the actual ID of the created row and no longer have to match payloads, which feels fragile.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community