donor-services/queue-monitor-core
最新稳定版本:v1.0.1
Composer 安装命令:
composer require donor-services/queue-monitor-core
包简介
Laravel Queue Monitoring Package - Tracks job execution, progress, and failures automatically
README 文档
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
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-28