https://github.com/schickling/laravel-queue-checker
Command to check the queue health status
https://github.com/schickling/laravel-queue-checker
Last synced: 9 months ago
JSON representation
Command to check the queue health status
- Host: GitHub
- URL: https://github.com/schickling/laravel-queue-checker
- Owner: schickling
- License: mit
- Created: 2014-02-25T12:06:48.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-01-22T14:18:03.000Z (over 10 years ago)
- Last Synced: 2025-04-24T02:52:25.084Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 24.4 KB
- Stars: 26
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
laravel-queue-checker [](https://travis-ci.org/schickling/laravel-queue-checker) [](https://coveralls.io/r/schickling/laravel-queue-checker) [](https://packagist.org/packages/schickling/queue-checker)
=====================
Command to check the queue health status. Can be used with hosted monitoring systems.
## Installation
1. Add the following to your composer.json and run `composer update`
```json
{
"require": {
"schickling/queue-checker": "dev-master"
}
}
```
2. Add `Schickling\QueueChecker\QueueCheckerServiceProvider` to your config/app.php
## Usage
### Run as cronjob
Run the following command as a cronjob (for example each minute). If the queue isn't connected or does not work (e.g. jammed), the binded `ErrorHandler` will be notified. The default `ErrorHandler` will log the incident.
```sh
$ php artisan queue:check
```
### Implement your own `ErrorHandler`
You can for example write an `ErrorHandler` that sends a message to your system monitoring platform such as NewRelic. Simply create a class that implements the `Schickling\QueueChecker\ErrorHandlers\ErrorHandlerInterface` and bind your `ErrorHandler` with the following code:
```php
App::bind('Schickling\QueueChecker\ErrorHandlers\ErrorHandlerInterface', 'App\MyCustomErrorHandler');
```