-
Notifications
You must be signed in to change notification settings - Fork 1.4k
PHPORM-81 implement mongodb
driver for batch
#2904
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
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9933b78
PHPORM-81 implement mmongodb driver for batch
GromNaN 6df5604
wip
GromNaN 408cf08
First test
GromNaN 556cd39
Import Laravel tests
GromNaN f882b29
-
GromNaN a711c4d
Update docs and review option names
GromNaN 4a30370
Adjust constraint for PendingBatch::progress
GromNaN d2b4942
Update changelog
GromNaN 8dbdbd3
Doc fix
GromNaN c542ed8
Add getUTCDateTime using Carbon::now
GromNaN 212a8cc
Wrapping callback not necessary
GromNaN c02c7ca
Update phpstan baseline
GromNaN b912ce7
Skip find query when storing a batch
GromNaN 5cfed4b
Update docs
GromNaN d0fd299
Apply suggestions from code review
GromNaN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -38,7 +38,7 @@ the driver in ``config/queue.php``: | |||||
- **Required**. Specifies the queue driver to use. Must be ``mongodb``. | ||||||
|
||||||
* - ``connection`` | ||||||
- Uses the default connection by default. The database connection used to store jobs. It must be a ``mongodb`` connection. | ||||||
- 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. | ||||||
|
||||||
* - ``collection`` | ||||||
- **Required**. Name of the MongoDB collection to store jobs to process. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Applies to all entries |
||||||
|
@@ -47,7 +47,7 @@ the driver in ``config/queue.php``: | |||||
- **Required**. Name of the queue. | ||||||
|
||||||
* - ``retry_after`` | ||||||
- Default ``60``. Specify how many seconds the queue connection should wait before retrying a job that is being processed | ||||||
- Specifies how many seconds the queue connection should wait before retrying a job that is being processed. Defaults to ``60``. | ||||||
|
||||||
If you want to use MongoDB to handle failed jobs, change the database in | ||||||
``config/queue.php``: | ||||||
|
@@ -71,10 +71,10 @@ If you want to use MongoDB to handle failed jobs, change the database in | |||||
- **Required**. Specifies the queue driver to use. Must be ``mongodb``. | ||||||
|
||||||
* - ``connection`` | ||||||
- Uses the default connection by default. The database connection used to store jobs. It must be a ``mongodb`` connection. | ||||||
- 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. | ||||||
|
||||||
* - ``collection`` | ||||||
- Default ``failed_jobs``. Name of the MongoDB collection to store failed jobs. | ||||||
- Name of the MongoDB collection to store failed jobs. Defaults to ``failed_jobs``. | ||||||
|
||||||
|
||||||
Add the service provider in ``config/app.php``: | ||||||
|
@@ -87,12 +87,12 @@ Add the service provider in ``config/app.php``: | |||||
Job Batching | ||||||
------------ | ||||||
|
||||||
`Job batching https://laravel.com/docs/{+laravel-docs-version+}/queues#job-batching>`__ | ||||||
is a Laravel feature to execute batch of jobs and subsequent actions before, | ||||||
`Job batching <https://laravel.com/docs/{+laravel-docs-version+}/queues#job-batching>`__ | ||||||
is a Laravel feature to execute a batch of jobs and subsequent actions before, | ||||||
after, and during the execution of the jobs from the queue. | ||||||
|
||||||
With MongoDB, you don't have to create any collection before using this feature. | ||||||
The collection ``job_batches`` will be created automatically to store meta | ||||||
With MongoDB, you don't have to create any collection before using job batching. | ||||||
The ``job_batches`` collection is created automatically to store meta | ||||||
information about your job batches, such as their completion percentage. | ||||||
|
||||||
.. code-block:: php | ||||||
|
@@ -114,10 +114,10 @@ information about your job batches, such as their completion percentage. | |||||
- **Required**. Specifies the queue driver to use. Must be ``mongodb``. | ||||||
|
||||||
* - ``connection`` | ||||||
- Uses the default connection by default. The database connection used to store jobs. It must be a ``mongodb`` connection. | ||||||
- 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. | ||||||
|
||||||
* - ``collection`` | ||||||
- Default ``job_batches``. Name of the MongoDB collection to store job batches. | ||||||
- Name of the MongoDB collection to store job batches. Defaults to ``job_batches``. | ||||||
|
||||||
Add the service provider in ``config/app.php``: | ||||||
|
||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.