GitHub - eXolnet/laravel-heartbeat: Periodically schedule a job to send a heartb...
source link: https://github.com/eXolnet/laravel-heartbeat
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
Laravel Heartbeat
Periodically schedule a job to send a heartbeat to a monitoring system.
Installation
Require this package with composer:
composer require exolnet/laravel-heartbeat
If you don't use package auto-discovery, add the service provider to the providers
array in config/app.php
:
Exolnet\Heartbeat\HeartbeatServiceProvider::class
And the facade to the facades
array in config/app.php
:
'Heartbeat' => Exolnet\Heartbeat\HeartbeatFacade::class
Config
Config Files
In order to edit the default configuration (where for e.g. you can find schedule
and presets
) for this package you may execute:
php artisan vendor:publish --provider="Exolnet\Heartbeat\HeartbeatServiceProvider"
After that, config/heartbeat.php
will be created. Inside this file you will find all the fields that can be edited in this package.
The default configuration file can be found here : config/heartbeat.php
Usage
Laravel Heartbeat should be working right after the service provider is loaded.
Default
By default Laravel Heartbeat is configure to use queue and the scheduler to create heartbeats. It will store it's files on Laravel's public disk. If you want a dedicated disk you should add a disk to app/config/filesystems.php and change the disk
option in the Queue preset
...
'presets' => [
...
'queue' => [
...
'disk' => 'local',
...
],
...
Available Channels
Disk
Channel used to store heartbeats in a Laravel Filesystem disk.
File
Channel used to store heartbeats in a file
Http
Channel used to make a heartbeat by calling a url
Testing
To run the phpUnit tests, please use:
composer test
Contributing
Please see CONTRIBUTING and CODE OF CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
This code is licensed under the MIT license. Please see the license file for more information.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK