mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 12:24:04 +00:00
clarify how dispatchNow() works
This commit is contained in:
parent
8e718ff7b9
commit
e6ab0ee9af
1 changed files with 5 additions and 0 deletions
|
|
@ -102,6 +102,11 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
|
|||
return;
|
||||
}
|
||||
|
||||
if (tenant() && $previousTenant && $previousTenant->is(tenant())) {
|
||||
// dispatchNow() was used and the tenant in the job is the same as the previous tenant
|
||||
return;
|
||||
}
|
||||
|
||||
if (tenant() && $previousTenant && $previousTenant->isNot(tenant())) {
|
||||
// Revert back to the previous tenant (since Tenancy v3.8.5 this should should *likely* not happen)
|
||||
tenancy()->initialize($previousTenant);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue