mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 18:04:03 +00:00
Queue bootstrapper use tenancy() state
This commit is contained in:
parent
057ddcbbae
commit
34d3189d61
1 changed files with 5 additions and 7 deletions
|
|
@ -15,8 +15,6 @@ use Stancl\Tenancy\Contracts\Tenant;
|
||||||
|
|
||||||
class QueueTenancyBootstrapper implements TenancyBootstrapper
|
class QueueTenancyBootstrapper implements TenancyBootstrapper
|
||||||
{
|
{
|
||||||
public $tenancyInitialized = false;
|
|
||||||
|
|
||||||
/** @var Repository */
|
/** @var Repository */
|
||||||
protected $config;
|
protected $config;
|
||||||
|
|
||||||
|
|
@ -75,17 +73,17 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
|
||||||
|
|
||||||
public function bootstrap(Tenant $tenant)
|
public function bootstrap(Tenant $tenant)
|
||||||
{
|
{
|
||||||
$this->tenancyInitialized = true;
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
public function revert()
|
public function revert()
|
||||||
{
|
{
|
||||||
$this->tenancyInitialized = false;
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPayload(string $connection)
|
public function getPayload(string $connection)
|
||||||
{
|
{
|
||||||
if (! $this->tenancyInitialized) {
|
if (! tenancy()->initialized) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue