leorent / slackdroid
Slack boot 在作业失败时发送通知到 Slack web-hook。
dev-master
2018-01-28 22:10 UTC
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-09-21 16:43:47 UTC
README
此包在作业队列失败时向 Slack web-hook 发送通知。它利用了 Laravel 5.5 通知功能。
安装
您可以通过 composer 安装此包
composer require leorent/slackdroid
为了使用 Slack 通知,您必须先安装 guzzle。
composer require guzzlehttp/guzzle
服务提供者将被自动注册。
接下来,您必须发布配置文件
php artisan vendor:publish --provider="Leo\DroidJobMonitor\BootJobMonitorServiceProvider"
在 vendor 发布后,将在 config
文件夹下生成一个新文件,命名为 boot-job-monitor.php
,其中包含通过环境文件提供的 Slack web-hook URL。
/*
* The channel web-hook to which the notification will be sent.
*/
return [
'slack' => [
'webhook_url' => env('FAILED_JOB_SLACK_WEBHOOK_URL'),
],
]
配置
使用方法
如果正确配置了 web-hook URL。当队列作业失败时,您将收到通知。
测试
待办事项
许可证
MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件。