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

后端 未结 7 969
抹茶落季
抹茶落季 2020-12-13 10:06

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 co

7条回答
  •  猫巷女王i
    2020-12-13 10:23

    If anybody is still looking approach for the older versions of the Laravel:

    $connection = 'queue';
    $queueName = 'default';
    $totalQueuedLeads = Redis::connection($connection)->zcount('queues:'.$queueName.':delayed' , '-inf', '+inf');
    

提交回复
热议问题