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

I am trying to write an ajax based notifier that will tell the logged in user if any jobs they have pushed to the queue have finished processing. I am storing the job id from the Queue::push method in the users session, but I have no way to see if the job has been processed. Is there a way to query the queue to see if the job is still in the queue?

Last updated 3 years ago.
0

You can try something like

Queue::getIron()->getMessageById($queue_name, $msg_id)

which calls API if you use Iron.io queues.

Last updated 3 years ago.
0

Depending on the driver you are using you can see the contents of the queue. For example with the database driver it is a simple table and it has the details of the jobs "serialized". you could check those details.

But why do you want to check that? Avoid a job doing one thing twice? Maybe the job should do some validations when it runs and its not the queue that should be responsible of know what it has queued.

There are some packages out there like "queue monitor" or "queue checker"

0

Sorry, pasted the response in the wrong thread.

Luckily it at least had something to do :P

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

trideout trideout Joined 22 Jul 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.