Support the ongoing development of Laravel.io →
posted 7 years ago
Queues
Last updated 2 years ago.
0

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.

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.