striebwj / horizon-stats
A horizon stats
0.1.0
2021-07-04 18:28 UTC
Requires
- php: >=7.2
- illuminate/support: ^6.0|^7.0|^8.0
- laravel/horizon: ^4|^5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- orchestra/testbench: ^4.0|^5.0|^6.0
- phpunit/phpunit: ^8.4|^9.0
README
Store long-term stats on the health of your Horizon Queues.
This package takes the Horizon snapshot data and stores it in the database, with easy to access models, so you can track your queue health over time.
Installation
Install via composer
composer require striebwj/horizon-stats
Publish package assets
php artisan vendor:publish --provider="striebwj\HorizonStats\ServiceProvider"
Update the horizon-stats.php
config file to change the database names. Default is horizon_stats
.
Usage
Once migrations are run, add the horizon-stats:store
command to your App\Console\Kernel.php
with the same time as
your Horizon Snapshot command. Be sure to add it before the snapshot. It should look something like this:
// Horizon Tasks $schedule->command('horizon-stats:store')->everyFiveMinutes(); // Before the snapshot $schedule->command('horizon:snapshot')->everyFiveMinutes();
To-do List
- Add tests
- Allow pushing storing in DB to a queue
- Add pruning?
Security
If you discover any security related issues, please email wade@striebel.ca instead of using the issue tracker.