Dal*_*lly 4 php laravel laravel-5 laravel-horizon laravel-5.8
如何重试Laravel Horizon 中所有失败的作业?似乎没有“全部重试”按钮,并且 artisan 命令不起作用,因为失败的作业未存储在表中。
该queue:retry命令接受all代替单个作业 ID:
php artisan queue:retry all
Run Code Online (Sandbox Code Playgroud)
这会将所有失败的作业推回到您的 Redis 队列中以进行重试:
The failed job [44] has been pushed back onto the queue!
The failed job [43] has been pushed back onto the queue!
...
Run Code Online (Sandbox Code Playgroud)
如果您没有根据安装指南创建失败日志表:
php artisan queue:failed-table
php artisan migrate
Run Code Online (Sandbox Code Playgroud)
那么你可能会在一条小溪上。也许尝试手动与 Redis 交互并尝试直接访问失败作业列表(假设失败作业条目尚未被擦除 - 看起来它们默认在 Redis 中保留一周,基于 中的配置设置config/horizon.php)。