kfoobar/flush-horizon

A Laravel package designed to efficiently manage and clear failed jobs from Horizon.

v1.0.1 2024-01-31 08:09 UTC

This package is auto-updated.

Last update: 2024-04-30 00:32:12 UTC


README

This package enhances your ability to efficiently manage the list of failed jobs within Laravel Horizon. It introduces two new console commands to your Laravel application, enabling you to manually flush all failed jobs stored in Redis, as well as flush all keys generated by Horizon in Redis.

While Laravel Horizon automatically purges failed jobs after 7 days by default, this package provides you with the flexibility to perform the flush operation manually through console commands whenever necessary.

Requirements

  • Laravel version 8.0 or newer
  • Laravel Horizon
  • Redis as the caching and session driver

Installing the Package

To incorporate the package into your project, execute the following command through Composer:

composer require kfoobar/flush-horizon

Getting Started

Flushing Failed Jobs

To clear all failed jobs from your queue, utilize the command below:

php artisan horizon:flush

Resetting Horizon Data

For a complete data reset, including all jobs and records, run:

php artisan horizon:reset

Contributing

Your contributions are highly appreciated! We welcome any form of contribution to improve and expand the functionality of this package.

License

The MIT License (MIT). Please see License File for more information.