msouto / redis-queue-inspector
A simple cli command to inspect Laravel Redis queues.
v0.1.3
2025-06-08 18:56 UTC
Requires
- php: ^8.1.0
Requires (Dev)
- laravel/pint: ^1.2.0
- phpstan/phpstan: ^1.8.6
README
A simple CLI tool to inspect delayed Redis queue jobs in Laravel. Useful for debugging, auditing, and gaining visibility into scheduled or stuck jobs.
π₯ Installation
Install the package via Composer:
composer require msouto/redis-queue-inspector
Laravel will auto-discover the service provider, no manual registration needed.
π Basic Usage
php artisan queue:inspect
This will inspect the first 50 delayed jobs in the default
Redis queue.
π Options
Option | Description |
---|---|
--queue= |
Comma-separated list of queue names (default: default ) |
--job= |
Filter by partial job class name |
--from= |
Filter jobs scheduled from this date (Y-m-d ) |
--to= |
Filter jobs scheduled up to this date (Y-m-d ) |
--limit= |
Number of jobs per page (default: 50 ) |
--page= |
Page number for pagination (default: 1 ) |
--count |
Only return the total number of matching jobs |
--identifier= |
Filter jobs that reference this model ID in the payload |
--uuid= |
Filter by exact job UUID (as generated by Laravel when dispatching) |
--json |
Output results in machine-readable JSON format |
β Examples
Show all delayed jobs in the default queue
php artisan queue:inspect
Show jobs in the emails
queue that contain "SendWelcome" in the class name
php artisan queue:inspect --queue=emails --job=SendWelcome
View jobs scheduled from a specific date
php artisan queue:inspect --from=2025-06-01
Search jobs that reference a model ID in the payload
php artisan queue:inspect --identifier=47004
Look up a job by UUID
php artisan queue:inspect --uuid=123e4567-e89b-12d3-a456-426614174000
Only return a count of matching jobs
php artisan queue:inspect --job=SendInvoice --count
Output results in JSON format
php artisan queue:inspect --queue=emails --job=SendWelcome --limit=2 --json
π Output Example
Showing 10 jobs (page 1) of 47 matching jobs.
+---------+--------------------------+--------------------------------------+---------------------+
| Queue | Job Name | Job ID | Release At |
+---------+--------------------------+--------------------------------------+---------------------+
| default | App\Jobs\SendWelcome | 123e4567-e89b-12d3-a456-426614174000 | 2025-06-12 21:58:54 |
+---------+--------------------------+--------------------------------------+---------------------+
Tip: Run with --page=2 to see more.
π Requirements
- PHP 8.1+
- Laravel with Redis queue driver enabled
π License
MIT License
π€ Author
MΓ‘rio Souto
mario.cs1@gmail.com