donor-services / queue-monitor-core
Laravel Queue Monitoring Package - Tracks job execution, progress, and failures automatically
Package info
github.com/donorservices/queue-monitor-core
pkg:composer/donor-services/queue-monitor-core
v1.0.1
2025-10-28 19:39 UTC
Requires
- php: ^8.2
- laravel/framework: ^12.0
Requires (Dev)
- fakerphp/faker: ^1.23
- orchestra/testbench: ^10.0
- pestphp/pest: ^4.1
- pestphp/pest-plugin-laravel: ^4.0
- phpunit/phpunit: ^12.0
README
Core Laravel Queue Monitoring Package - Tracks job execution, progress, and failures automatically.
Features
- ✅ Automatic job tracking
- ✅ Progress tracking (0-100%)
- ✅ Exception storage
- ✅ Attempt tracking
- ✅ Execution duration
- ✅ Auto-pruning old records
- ✅ Universal Queue Driver Support (Database, Redis, SQS, Beanstalkd, etc.)
- ✅ Laravel Horizon Compatible
Installation
From Local Path Repository
composer require donor-services/queue-monitor-core "*"
From Packagist (when published)
composer require donor-services/queue-monitor-core
Configuration
Publish the configuration file:
php artisan vendor:publish --tag=queue-monitor-config
Usage
Basic Usage
No configuration needed! Just start dispatching jobs and they'll be automatically tracked.
Progress Tracking
Add the QueueProgress trait to your job:
use DonorServices\QueueMonitor\Core\Traits\QueueProgress; class ProcessVideoJob implements ShouldQueue { use QueueProgress; public function handle() { for ($i = 0; $i < 100; $i++) { // Process video $this->setProgress($i); } } }
Using the Service
use DonorServices\QueueMonitor\Core\Services\QueueMonitorService; // Get statistics $stats = QueueMonitorService::getStats('today'); // Get failed jobs $failed = QueueMonitorService::getFailedJobs(10); // Get running jobs $running = QueueMonitorService::getRunningJobs();
Testing
Run the test suite:
composer test
License
MIT