Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gilbitron/laravel-queue-monitor
A Laravel package to monitor queue jobs
https://github.com/gilbitron/laravel-queue-monitor
Last synced: 30 days ago
JSON representation
A Laravel package to monitor queue jobs
- Host: GitHub
- URL: https://github.com/gilbitron/laravel-queue-monitor
- Owner: gilbitron
- License: mit
- Created: 2017-01-17T13:47:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-17T13:58:08.000Z (almost 8 years ago)
- Last Synced: 2024-09-19T11:42:04.413Z (about 2 months ago)
- Language: PHP
- Homepage: https://packagist.org/packages/gilbitron/laravel-queue-monitor
- Size: 4.88 KB
- Stars: 10
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Queue Monitor
A Laravel package to monitor queue jobs. Logs certain information about [queue jobs](https://laravel.com/docs/5.3/queues) in a database table:
* The elapsed time of the job including start and finish timestamps
* If `--tries` is being used the attempt number for each job
* If the job failed and the exception given (if available)
* Custom data (optional)## Requirements
* Laravel 5.3+
## Install
Install the composer package:
```php
composer require gilbitron/laravel-queue-monitor
```Add the service provider in `config/app.php`:
```php
/*
* Package Service Providers...
*/
Gilbitron\LaravelQueueMonitor\LaravelQueueMonitorProvider::class,
```Run a migration to setup the `queue_monitor` database table:
```php
php artisan migrate
```## Usage
All queue jobs will now be monitored and results stored to the `queue_monitor` database table. No other configuration is required.
### Custom Data
To save custom data with the queue monitor results you need to include the `QueueMonitorData` trait in your Job and use the `saveQueueMonitorData()` method. For example:
```php
results = rand(1, 100);$this->saveQueueMonitorData([
'results' => $this->results,
]);// ...
}
}
```## Credits
Laravel Queue Monitor was created by [Gilbert Pellegrom](https://gilbert.pellegrom.me) from
[Dev7studios](https://dev7studios.co). Released under the MIT license.