mvpopuk/laravel-enhanced-failed-jobs
Composer 安装命令:
composer require mvpopuk/laravel-enhanced-failed-jobs
包简介
Laravel package for Queuewatch - Real-time queue failure monitoring
README 文档
README
Enhanced CLI
Installation
composer require queuewatch/laravel
Basic Commands
# List all failed jobs (table format) php artisan queue:failed # Output as JSON php artisan queue:failed --json
Filtering Options
# Filter by queue name php artisan queue:failed --queue=emails # Filter by connection php artisan queue:failed --connection=redis # Filter by date range php artisan queue:failed --after="2025-11-20" php artisan queue:failed --before="2025-11-21" php artisan queue:failed --after=yesterday --before=today # Filter by job class (partial match) php artisan queue:failed --class=SendEmail # Limit results php artisan queue:failed --limit=50 # Combine multiple filters php artisan queue:failed --queue=emails --after=yesterday --limit=10 --json
JSON Output Format
{
"failed_jobs": [
{
"id": "1234",
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"connection": "redis",
"queue": "emails",
"payload": {
"displayName": "App\\Jobs\\SendEmail",
"job": "Illuminate\\Queue\\CallQueuedHandler@call",
"data": {}
},
"exception": "Connection timeout...",
"failed_at": "2025-11-21 10:30:00"
}
],
"count": 1
}
Queuewatch.io (Optional)
Official Laravel package for Queuewatch - Real-time queue failure monitoring with instant notifications.
- Real-time Failure Reporting - Automatically capture and report queue job failures to your Queuewatch dashboard
- Rich Exception Data - Full stack traces, job payloads, and server context
- Smart Filtering - Ignore specific jobs, queues, or exception types
- Remote Retry - Retry failed jobs directly from the Queuewatch dashboard
- Instant Notifications - Get notified via Slack, Discord, email, or webhooks when jobs fail
Requirements
- PHP 8.1+
- Laravel 10.x, 11.x, or 12.x
- A Queuewatch account
Installation
composer require queuewatch/laravel
Add your API key to .env:
QUEUEWATCH_API_KEY=qw_live_xxxxxxxxxxxxxxxxxxxx
That's it! The package automatically hooks into Laravel's queue system and starts reporting failures.
Getting Your API Key
- Sign up at queuewatch.io
- Create a new project in your dashboard
- Copy the API key from Settings → API Keys
- Add it to your
.envfile
Configuration
Publish the config file for advanced customization:
php artisan vendor:publish --tag=queuewatch-config
Available Options
// config/queuewatch.php return [ 'enabled' => env('QUEUEWATCH_ENABLED', true), 'api_key' => env('QUEUEWATCH_API_KEY'), 'project' => env('QUEUEWATCH_PROJECT', env('APP_NAME')), 'environment' => env('QUEUEWATCH_ENVIRONMENT', env('APP_ENV')), // Jobs to ignore 'ignored_jobs' => [ // App\Jobs\NoisyJob::class, ], // Queues to ignore 'ignored_queues' => [ // 'low-priority', ], // Exceptions to ignore 'ignored_exceptions' => [ // Illuminate\Database\Eloquent\ModelNotFoundException::class, ], ];
Environment Variables
| Variable | Description | Default |
|---|---|---|
QUEUEWATCH_ENABLED |
Enable/disable failure reporting | true |
QUEUEWATCH_API_KEY |
Your Queuewatch API key | - |
QUEUEWATCH_PROJECT |
Project name in dashboard | APP_NAME |
QUEUEWATCH_ENVIRONMENT |
Environment label (production, staging, etc.) | APP_ENV |
QUEUEWATCH_RETRY_ENABLED |
Enable remote retry feature | false |
Testing Your Integration
php artisan queuewatch:test
This verifies your API key and connection. Add --send-test to send a test failure:
php artisan queuewatch:test --send-test
You should see the test failure appear in your Queuewatch dashboard within seconds.
What Gets Reported
When a job fails, Queuewatch captures:
- Job Details - Class name, queue, connection, attempts, max tries
- Exception - Message, class, file, line, full stack trace
- Payload - Complete job payload (can be disabled for sensitive data)
- Context - Server hostname, PHP version, Laravel version, timestamp
- Environment - Your configured environment label
Remote Retry
Enable remote retry to retry failed jobs directly from the Queuewatch dashboard:
QUEUEWATCH_RETRY_ENABLED=true
Configure allowed queues for security:
'retry' => [ 'enabled' => env('QUEUEWATCH_RETRY_ENABLED', false), 'allowed_queues' => ['payments', 'emails'], // or ['*'] for all ],
When enabled, you can click "Retry" on any failed job in your Queuewatch dashboard, and it will be re-dispatched to your Laravel application.
Notifications
Configure notifications in your Queuewatch dashboard:
- Slack - Get alerts in your team's Slack channel
- Discord - Send notifications to Discord webhooks
- Email - Receive email alerts for failures
- Webhooks - Integrate with any service via custom webhooks
Set up notification rules to filter by environment, job type, or failure frequency.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
mvpopuk/laravel-enhanced-failed-jobs 适用场景与选型建议
mvpopuk/laravel-enhanced-failed-jobs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 11 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「queue」 「json」 「cli」 「laravel」 「failed-jobs」 「mvpopuk」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mvpopuk/laravel-enhanced-failed-jobs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mvpopuk/laravel-enhanced-failed-jobs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mvpopuk/laravel-enhanced-failed-jobs 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Kinikit - PHP Application development framework MVC component
PHP AMQP Binding Library
A Laravel package to monitor queue jobs.
ext-json wrapper with sane defaults
A package to cast json fields, each sub-keys is castable
swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-25