mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
Improved Documentation Search (#61)
* chore: (Improve documentation search for V3) * fix: checks for mispelled words * fix: mispelled words * fix spaces and syntax * Update multi-database-tenancy.blade.md Co-authored-by: Samuel Stancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
0549607899
commit
a4645b3abd
42 changed files with 158 additions and 158 deletions
|
|
@ -4,7 +4,7 @@ extends: _layouts.documentation
|
|||
section: content
|
||||
---
|
||||
|
||||
# Queues
|
||||
# Queues {#queues}
|
||||
|
||||
If you're using the `QueueTenancyBootstrapper`, queued jobs dispatched from the tenant context will be automatically tenant-aware. The jobs will be stored centrally — if you're using the database queue driver, they will be stored in the `jobs` table in the central database. And tenancy will be initialized for the current tenant prior to the job being processed.
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ If you're using the `QueueTenancyBootstrapper`, queued jobs dispatched from the
|
|||
|
||||
Note: You cannot inject model **instances** with the `SerializesModels` trait, because it tries to hydrate the models before the `tenant` connection is created. Inject model ids instead and use `find()` in the handle method.
|
||||
|
||||
### Database queue driver
|
||||
### Database queue driver {#database-queue-driver}
|
||||
|
||||
To force the database queue driver to use the central connection, open your `queue.connections.database` config and add the following line:
|
||||
|
||||
|
|
@ -22,11 +22,11 @@ To force the database queue driver to use the central connection, open your `que
|
|||
|
||||
(Replace `central` with the name of your central database connection.)
|
||||
|
||||
### Redis queue driver
|
||||
### Redis queue driver {#redis-queue-driver}
|
||||
|
||||
Make sure the connection used by the queue is not in `tenancy.redis.prefixed_connections`.
|
||||
|
||||
## Central queues
|
||||
## Central queues {#central-queues}
|
||||
|
||||
Jobs dispatched from the central context will remain central. However, it's recommended not to mix queue **connections** for central & tenant jobs due to potential leftover global state, e.g. central jobs thinking they're in the previous tenant's context.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue