kfoobar/flush-horizon

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

Installs: 4 065

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

Open Issues: 0

Type:plugin

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

This package is auto-updated.

Last update: 2024-10-30 02:10:49 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.