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!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community