kirschbaum-development/laravel-queue-batch-retry
Composer 安装命令:
composer require kirschbaum-development/laravel-queue-batch-retry
包简介
Package to retry failed jobs in batch using custom filters
README 文档
README
Laravel only allows you to retry one job per time or all of them when using the queue:retry command. This package gives you a few more options so you retry failed jobs in batches filtering to only the jobs you want.
Installation
You can install the package via composer:
composer require kirschbaum-development/laravel-queue-batch-retry
Usage
There's two different commands this package provides.
queue:failed:batch-retry
php artisan queue:failed:batch-retry --failed-after="2 days ago" --queue="default" --limit=10 --filter="CrawlWebsiteJob" --filter-by-exception="ModelNotFoundException"
--filter
The failed_jobs table is not really a structured table, so "searching" is basically a like condition on the payload condition. Using this option, depending on how many records you have, could be very slow since it will have to do a full table scan to find results. Hopefully, you don't have a lot of failed jobs, though.
php artisan queue:failed:batch-retry --filter="PublishDocumentJob" php artisan queue:failed:batch-retry --filter="12234"
--exclude-filter
This is exact same as --filter, except in reverse. It will search all the payloads and exclude those given in the parameter.
php artisan queue:failed:batch-retry --exclude-filter="PublishDocumentJob"
--filter-by-exception
Same as the --filter option, but for the exception column in the failed_jobs table. Using this option, depending on how many records you have, could be very slow since it will have to do a full table scan to find results.
php artisan queue:failed:batch-retry --filter-by-exception="ModelNotFoundException" php artisan queue:failed:batch-retry --filter-by-exception="Error when creating directory"
--failed-after
This option filters failed_at column. So let's say you had a bunch of jobs that failed today because of some API error in one of the services you use. You can retry all the jobs that failed since "today".
php artisan queue:failed:batch-retry --failed-after="today"
--failed-before
Same as the failed-after, but looking at previous dates.
php artisan queue:failed:batch-retry --failed-before="yesterday"
--limit
In case you want to run in just a specific number of jobs.
php artisan queue:failed:batch-retry --limit=10
--dry-run
We always get afraid of screwing things up, right? You can run dry run the command and see what's going to be executed first.
php artisan queue:failed:batch-retry --dry-run
queue:failed:batch-delete
In case you simply want to clean up your failed jobs table, there's also a queue:failed:batch-delete command which works exactly the same as the queue:failed:batch-retry command. You can use the same filters and options provided by the retry command.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email luis@kirschbaumdevelopment.com or nathan@kirschbaumdevelopment.com instead of using the issue tracker.
Credits
Sponsorship
Development of this package is sponsored by Kirschbaum Development Group, a developer driven company focused on problem solving, team building, and community. Learn more about us or join us!
License
The MIT License (MIT). Please see License File for more information.
kirschbaum-development/laravel-queue-batch-retry 适用场景与选型建议
kirschbaum-development/laravel-queue-batch-retry 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 333.27k 次下载、GitHub Stars 达 51, 最近一次更新时间为 2020 年 07 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「kirschbaum-development」 「laravel-queue-batch-retry」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kirschbaum-development/laravel-queue-batch-retry 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kirschbaum-development/laravel-queue-batch-retry 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kirschbaum-development/laravel-queue-batch-retry 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Route macro that easily loads a route file without unnecessary method calls.
Livewire Filters is a series of Livewire components that provide you with the tools to do live filtering of your data from your own Livewire components.
A Filament plugin that wraps @pierre/diffs to render beautiful file diffs and syntax-highlighted code views.
This is my package filament-package_ffhs_approvals
统计信息
- 总下载量: 333.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 51
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-07-03