1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 14:34:04 +00:00

Session scoping & tenant() cleanup

This commit is contained in:
Samuel Štancl 2020-05-15 11:07:42 +02:00
parent c8f9a82745
commit 05d6383b99
6 changed files with 125 additions and 4 deletions

View file

@ -46,7 +46,7 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
}
// Tenancy is already initialized for the tenant (e.g. dispatchNow was used)
if (tenancy()->initialized && tenant('id') === $tenantId) {
if (tenancy()->initialized && tenant()->getTenantKey() === $tenantId) {
return;
}
@ -87,7 +87,7 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
return [];
}
$id = tenant('id');
$id = tenant()->getTenantKey();
return [
'tenant_id' => $id,