3.5.0 queue changes

This commit is contained in:
Samuel Štancl 2022-01-03 23:57:46 +01:00 committed by GitHub
parent 30a9997963
commit 9003b7ab16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,8 +10,6 @@ If you're using the `QueueTenancyBootstrapper`, queued jobs dispatched from the
**However**, note that if you're using the `DatabaseTenancyBootstrapper` and the `database` queue driver, or the `RedisTenancyBootstrapper` and the `redis` queue driver, you will need to make sure the jobs don't get dispatched into the tenant context for these drivers. **However**, note that if you're using the `DatabaseTenancyBootstrapper` and the `database` queue driver, or the `RedisTenancyBootstrapper` and the `redis` queue driver, you will need to make sure the jobs don't get dispatched into the tenant context for these drivers.
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 {#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: To force the database queue driver to use the central connection, open your `queue.connections.database` config and add the following line: