leorent / slackdroid
Slack boot to send a notification to a slack web-hook whenever a job fails.
Requires
- php: ^7.0
- guzzlehttp/guzzle: ^6.3
- illuminate/contracts: ~5.5.0
- illuminate/notifications: ~5.5.0
- illuminate/queue: ~5.5.0
- illuminate/support: ~5.5.0
This package is not auto-updated.
Last update: 2024-05-04 14:54:32 UTC
README
This package sends notifications to a slack web-hook if a queued job fails. It leverages Laravel 5.5 notification capabilities.
Installation
You can install the package via composer:
composer require leorent/slackdroid
In order to use slack notification you must install guzzle first.
composer require guzzlehttp/guzzle
The service provider will automatically be registered.
Next, you must publish the config file:
php artisan vendor:publish --provider="Leo\DroidJobMonitor\BootJobMonitorServiceProvider"
After vendor publish a new file will be generated under config
folder, named boot-job-monitor.php
that contains slack web-hook url provided through env file.
/*
* The channel web-hook to which the notification will be sent.
*/
return [
'slack' => [
'webhook_url' => env('FAILED_JOB_SLACK_WEBHOOK_URL'),
],
]
Configuration
Usage
If you configured web-hook url correctly. You'll receive a notification when a queued job fails.
Testing
TODO
License
The MIT License (MIT). Please see License File for more information.