How to get all pending jobs in laravel queue on redis?

0 votes
Queue listener was not started on a server, some jobs where pushed (using Redis driver).

How could I count (or get all) theses jobs ? I did not found any artisan command to get this information.

Thanxxx in Advanced!!
Apr 6 in Laravel by kartik
• 35,500 points
1,684 views

1 answer to this question.

0 votes

Hello @kartik,

Here is the way I do it:

$connection = null;
$default = 'default';

//For the delayed jobs
var_dump( \Queue::getRedis()->connection($connection)->zrange('queues:'.$default.':delayed' ,0, -1) );

//For the reserved jobs
var_dump( \Queue::getRedis()->connection($connection)->zrange('queues:'.$default.':reserved' ,0, -1) );

$connection is the Redis connection name which is null by default, and The $queue is the name of the queue / tube which is 'default' by default!

Thank you!!

answered Apr 6 by Niroj
• 76,940 points

Related Questions In Laravel

0 votes
4 answers

How to get user's IP address in Laravel?

Use $clientIP = request()->ip(); READ MORE

answered Sep 21 in Laravel by aakash
• 230 points
10,129 views
0 votes
1 answer

How to get distinct values for non-key column fields in Laravel?

Hello @kartik In eloquent you can use this $users ...READ MORE

answered Mar 30 in Laravel by Niroj
• 76,940 points
5,736 views
0 votes
1 answer

How to get a list of registered route paths in Laravel?

Hello, Route::getRoutes() returns a RouteCollection. On each element, you can ...READ MORE

answered Mar 31 in Laravel by Niroj
• 76,940 points
357 views
0 votes
1 answer

How to get data from Laravel backend and display in Vue/Nuxt frontend

Hello, You have to use the package dotenv. Then ...READ MORE

answered Apr 8 in Laravel by Niroj
• 76,940 points
958 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18 in Laravel by Niroj
• 76,940 points
3,470 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18 in Laravel by Niroj
• 76,940 points
412 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23 in Laravel by Niroj
• 76,940 points
285 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23 in Laravel by Niroj
• 76,940 points
4,165 views
0 votes
1 answer
0 votes
1 answer

How to identify wheather the request is HTTP GET or HTTP POST in Laravel?

Hey, In order to identify the type of ...READ MORE

answered Mar 19 in Laravel by Niroj
• 76,940 points
134 views