Commit 5cda0ce3 authored by Alisson Pereira's avatar Alisson Pereira

Adds specific lumen queue config description

parent 18989475
...@@ -42,6 +42,8 @@ This package adds functionalities to the Eloquent model and Query builder for Mo ...@@ -42,6 +42,8 @@ This package adds functionalities to the Eloquent model and Query builder for Mo
- [Cross-Database Relationships](#cross-database-relationships) - [Cross-Database Relationships](#cross-database-relationships)
- [Authentication](#authentication) - [Authentication](#authentication)
- [Queues](#queues) - [Queues](#queues)
- [Laravel specific](#laravel-specific)
- [Lumen specific](#Lumen-specific)
- [Upgrading](#upgrading) - [Upgrading](#upgrading)
- [Upgrading from version 2 to 3](#upgrading-from-version-2-to-3) - [Upgrading from version 2 to 3](#upgrading-from-version-2-to-3)
...@@ -1067,6 +1069,8 @@ If you want to use MongoDB as your database backend, change the driver in `confi ...@@ -1067,6 +1069,8 @@ If you want to use MongoDB as your database backend, change the driver in `confi
'connections' => [ 'connections' => [
'database' => [ 'database' => [
'driver' => 'mongodb', 'driver' => 'mongodb',
// You can also specify your jobs specific database created on config/database.php
'connection' => 'mongodb-job',
'table' => 'jobs', 'table' => 'jobs',
'queue' => 'default', 'queue' => 'default',
'expire' => 60, 'expire' => 60,
...@@ -1078,23 +1082,31 @@ If you want to use MongoDB to handle failed jobs, change the database in `config ...@@ -1078,23 +1082,31 @@ If you want to use MongoDB to handle failed jobs, change the database in `config
```php ```php
'failed' => [ 'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database'), 'driver' => 'mongodb',
'database' => env('DB_CONNECTION', 'mongodb'), // You can also specify your jobs specific database created on config/database.php
'database' => 'mongodb-job',
'table' => 'failed_jobs', 'table' => 'failed_jobs',
], ],
``` ```
Or simply set your own `QUEUE_FAILED_DRIVER` environment variable to `mongodb` #### Laravel specific
```env
QUEUE_FAILED_DRIVER=mongodb
```
Last, add the service provider in `config/app.php`: Add the service provider in `config/app.php`:
```php ```php
Jenssegers\Mongodb\MongodbQueueServiceProvider::class, Jenssegers\Mongodb\MongodbQueueServiceProvider::class,
``` ```
#### Lumen specific
With [Lumen](http://lumen.laravel.com), add the service provider in `bootstrap/app.php`. You must however ensure that you add the following **after** the `MongodbServiceProvider` registration.
```php
$app->make('queue');
$app->register(Jenssegers\Mongodb\MongodbQueueServiceProvider::class);
```
Upgrading Upgrading
--------- ---------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment