Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Query the size of a Laravel queue

Tags:

php

queue

laravel

I am planning to use Laravel Queue, and now I am doing some research:

Is it possible to get the size of a Laravel queue? Even better, can I get some statistics of a Laravel queue?

like image 608
Skywalker Avatar asked Jan 21 '18 16:01

Skywalker


1 Answers

Queue::size($queue);

The size method will return the size of the given queue. Queue::size() will return the size of the default queue.

If you are using redis you can use Laravel Horizon to get more detailed insights into what is happening in your queues.

like image 73
Mathew Tinsley Avatar answered Sep 20 '22 12:09

Mathew Tinsley