okipa/laravel-failed-jobs-notifier

This package is abandoned and no longer maintained. The author suggests using the https://github.com/Okipa/laravel-stuck-jobs-notifier package instead.

Get notified when failed jobs are stuck.

2.0.0 2020-03-16 08:54 UTC

This package is auto-updated.

Last update: 2020-05-05 15:15:14 UTC


README

Source Code Latest Version Total Downloads License: MIT Build Status Coverage Status Quality Score

Get notified when some jobs are stuck in your failed_jobs table for a number of days of your choice.
Notifications can be sent by mail, Slack and webhooks (chats often provide a webhook API).

⚠️ Package abandoned => please now use https://github.com/Okipa/laravel-stuck-jobs-notifier ⚠️

Compatibility

Laravel version PHP version Package version
^5.8 ^7.2 ^2.0
^5.5 ^7.1 ^1.0

Table of Contents

Installation

  • Install the package with composer :
composer require "okipa/laravel-failed-jobs-notifier:^1.0"
  • Laravel 5.5+ uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

If you don't use auto-discovery or if you use a Laravel 5.4- version, add the package service provider in the register() method from your app/Providers/AppServiceProvider.php :

// laravel bootstrap components
// https://github.com/Okipa/laravel-failed-jobs-notifier
$this->app->register(\Okipa\LaravelFailedJobsNotifier\FailedJobsReporterServiceProvider::class);

Configuration

Publish the package configuration and override the available config values :

php artisan vendor:publish --tag=failed-jobs-notifier:config

Usage

Just add this command in the schedule() method of your \App\Console\Kernel class :

$schedule->command('queue:failed:notify')->twiceDaily(9, 15);

And you will be notified as soon as some jobs will be stuck in the failed_jobs table for the number of days you configured.

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.