This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$numJobs = DB::table('jobs')->where('queue', 'myqueue')->count(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$numJobs = Redis::connection()->llen('queues:myqueue'); |
I also needed the possibility to remove all jobs in a specific queue at once in my application. To do so, I used the code shown below.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Redis::connection()->del('queues:myqueue'); |