Support the ongoing development of Laravel.io →
posted 10 years ago
Queues

I'm using Redis queues in a project and now I find myself in a position where I need to delete a job based on its ID and find myself a bit lost as I don't have much experience with Redis yet.

Here's a bit background info. I have a Booking model that, as soon as it gets created, has a status of reserved. At the same time we create a Redis job to set the booking to expired after 30min if the status has not changed in the meantime and we save the job ID. Now, if the status does get changed to something else, like confirmed, we then need to remove that job from the queue to avoid it setting the status back to expired.

I've been able to do this with Beanstalkd before, but unfortunately we've consistently run into issues with queues on our staging and production servers and have then switched to Redis queues, which work great.

So, basically, my question is how I delete a Redis job based on its ID?

Cheers!

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

shabushabu shabushabu Joined 31 Jan 2014

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.

© 2025 Laravel.io - All rights reserved.