schickling / queue-checker
Command to check the queue health status
Installs: 5 673
Dependents: 0
Suggesters: 0
Security: 0
Stars: 26
Watchers: 4
Forks: 3
Open Issues: 0
Requires
- php: >=5.4.0
Requires (Dev)
- laravel/framework: 4.1.*
- mockery/mockery: dev-master
- orchestra/testbench: 2.1.*
- satooshi/php-coveralls: 0.6.*
This package is not auto-updated.
Last update: 2024-10-26 15:11:47 UTC
README
Command to check the queue health status. Can be used with hosted monitoring systems.
Installation
-
Add the following to your composer.json and run
composer update
{ "require": { "schickling/queue-checker": "dev-master" } }
-
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.
$ 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:
App::bind('Schickling\QueueChecker\ErrorHandlers\ErrorHandlerInterface', 'App\MyCustomErrorHandler');