You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,15 @@
1
1
# Changelog
2
2
All notable changes to this project will be documented in this file.
3
3
4
+
## [4.4.0] - 2024-05-31
5
+
6
+
* Support collection name prefix by @GromNaN in [#2930](https://github.com/mongodb/laravel-mongodb/pull/2930)
7
+
* Ignore `_id: null` to let MongoDB generate an `ObjectId` by @GromNaN in [#2969](https://github.com/mongodb/laravel-mongodb/pull/2969)
8
+
* Add `mongodb` driver for Batching by @GromNaN in [#2904](https://github.com/mongodb/laravel-mongodb/pull/2904)
9
+
* Rename queue option `table` to `collection`
10
+
* Replace queue option `expire` with `retry_after`
11
+
* Revert behavior of `createOrFirst` to delegate to `firstOrCreate` when in transaction by @GromNaN in [#2984](https://github.com/mongodb/laravel-mongodb/pull/2984)
12
+
4
13
## [4.3.1] - 2024-05-31
5
14
6
15
* Fix memory leak when filling nested fields using dot notation by @GromNaN in [#2962](https://github.com/mongodb/laravel-mongodb/pull/2962)
Copy file name to clipboardExpand all lines: docs/queues.txt
+88-8
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Queues
11
11
.. meta::
12
12
:keywords: php framework, odm, code example
13
13
14
-
If you want to use MongoDB as your database backend for Laravel Queue, change
14
+
If you want to use MongoDB as your database backend for Laravel Queue, change
15
15
the driver in ``config/queue.php``:
16
16
17
17
.. code-block:: php
@@ -20,27 +20,107 @@ the driver in ``config/queue.php``:
20
20
'database' => [
21
21
'driver' => 'mongodb',
22
22
// You can also specify your jobs specific database created on config/database.php
23
-
'connection' => 'mongodb-job',
24
-
'table' => 'jobs',
23
+
'connection' => 'mongodb',
24
+
'collection' => 'jobs',
25
25
'queue' => 'default',
26
-
'expire' => 60,
26
+
'retry_after' => 60,
27
27
],
28
28
],
29
29
30
-
If you want to use MongoDB to handle failed jobs, change the database in
30
+
.. list-table::
31
+
:header-rows: 1
32
+
:widths: 25 75
33
+
34
+
* - Setting
35
+
- Description
36
+
37
+
* - ``driver``
38
+
- **Required**. Specifies the queue driver to use. Must be ``mongodb``.
39
+
40
+
* - ``connection``
41
+
- The database connection used to store jobs. It must be a ``mongodb`` connection. The driver uses the default connection if a connection is not specified.
42
+
43
+
* - ``collection``
44
+
- **Required**. Name of the MongoDB collection to store jobs to process.
45
+
46
+
* - ``queue``
47
+
- **Required**. Name of the queue.
48
+
49
+
* - ``retry_after``
50
+
- Specifies how many seconds the queue connection should wait before retrying a job that is being processed. Defaults to ``60``.
51
+
52
+
If you want to use MongoDB to handle failed jobs, change the database in
31
53
``config/queue.php``:
32
54
33
55
.. code-block:: php
34
56
35
57
'failed' => [
36
58
'driver' => 'mongodb',
37
-
// You can also specify your jobs specific database created on config/database.php
38
-
'database' => 'mongodb-job',
39
-
'table' => 'failed_jobs',
59
+
'database' => 'mongodb',
60
+
'collection' => 'failed_jobs',
40
61
],
41
62
63
+
.. list-table::
64
+
:header-rows: 1
65
+
:widths: 25 75
66
+
67
+
* - Setting
68
+
- Description
69
+
70
+
* - ``driver``
71
+
- **Required**. Specifies the queue driver to use. Must be ``mongodb``.
72
+
73
+
* - ``connection``
74
+
- The database connection used to store jobs. It must be a ``mongodb`` connection. The driver uses the default connection if a connection is not specified.
75
+
76
+
* - ``collection``
77
+
- Name of the MongoDB collection to store failed jobs. Defaults to ``failed_jobs``.
is a Laravel feature to execute a batch of jobs and subsequent actions before,
92
+
after, and during the execution of the jobs from the queue.
93
+
94
+
With MongoDB, you don't have to create any collection before using job batching.
95
+
The ``job_batches`` collection is created automatically to store meta
96
+
information about your job batches, such as their completion percentage.
97
+
98
+
.. code-block:: php
99
+
100
+
'batching' => [
101
+
'driver' => 'mongodb',
102
+
'database' => 'mongodb',
103
+
'collection' => 'job_batches',
104
+
],
105
+
106
+
.. list-table::
107
+
:header-rows: 1
108
+
:widths: 25 75
109
+
110
+
* - Setting
111
+
- Description
112
+
113
+
* - ``driver``
114
+
- **Required**. Specifies the queue driver to use. Must be ``mongodb``.
115
+
116
+
* - ``connection``
117
+
- The database connection used to store jobs. It must be a ``mongodb`` connection. The driver uses the default connection if a connection is not specified.
118
+
119
+
* - ``collection``
120
+
- Name of the MongoDB collection to store job batches. Defaults to ``job_batches``.
0 commit comments