okipa/laravel-failed-jobs-notifier

Get notified when failed jobs are stuck.

Downloads

1112

Stars

0

Version

2.0.0

This package has been archived

Get notified when failed jobs are stuck

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).

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

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.