Skip to content

Adds specific lumen queue config description on readme #2032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ This package adds functionalities to the Eloquent model and Query builder for Mo
- [Cross-Database Relationships](#cross-database-relationships)
- [Authentication](#authentication)
- [Queues](#queues)
- [Laravel specific](#laravel-specific)
- [Lumen specific](#Lumen-specific)
- [Upgrading](#upgrading)
- [Upgrading from version 2 to 3](#upgrading-from-version-2-to-3)

Expand Down Expand Up @@ -1067,6 +1069,8 @@ If you want to use MongoDB as your database backend, change the driver in `confi
'connections' => [
'database' => [
'driver' => 'mongodb',
// You can also specify your jobs specific database created on config/database.php
'connection' => 'mongodb-job',
'table' => 'jobs',
'queue' => 'default',
'expire' => 60,
Expand All @@ -1078,23 +1082,31 @@ If you want to use MongoDB to handle failed jobs, change the database in `config

```php
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
'database' => env('DB_CONNECTION', 'mongodb'),
'driver' => 'mongodb',
// You can also specify your jobs specific database created on config/database.php
'database' => 'mongodb-job',
'table' => 'failed_jobs',
],
```

Or simply set your own `QUEUE_FAILED_DRIVER` environment variable to `mongodb`
```env
QUEUE_FAILED_DRIVER=mongodb
```
#### Laravel specific

Last, add the service provider in `config/app.php`:
Add the service provider in `config/app.php`:

```php
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
---------

Expand Down