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?
You can try something like
Queue::getIron()->getMessageById($queue_name, $msg_id)
which calls API if you use Iron.io queues.
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"
Sorry, pasted the response in the wrong thread.
Luckily it at least had something to do :P
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community