class QueueTenancyBootstrapper implements TenancyBootstrapper (View source)

Properties

protected Repository $config
protected QueueManager $queue
static bool $forceRefresh

Don't persist the same tenant across multiple jobs even if they have the same tenant ID.

Methods

static void
__constructStatic(Application $app)

The normal constructor is only executed after tenancy is bootstrapped.

__construct(Repository $config, QueueManager $queue)

No description

static void
setUpJobListener(Dispatcher $dispatcher)

No description

static void
initializeTenancyForQueue(string|int|null $tenantId)

No description

static void
revertToPreviousState(JobFailed $event, Tenant|null $previousTenant)

No description

void
setUpPayloadGenerator()

No description

void
bootstrap(Tenant $tenant)

No description

void
revert()

No description

array
getPayload(string $connection)

No description

Details

static void __constructStatic(Application $app)

The normal constructor is only executed after tenancy is bootstrapped.

However, we're registering a hook to initialize tenancy. Therefore, we need to register the hook at service provider execution time.

Parameters

Application $app

Return Value

void

__construct(Repository $config, QueueManager $queue)

No description

Parameters

Repository $config
QueueManager $queue

static protected void setUpJobListener(Dispatcher $dispatcher)

No description

Parameters

Dispatcher $dispatcher

Return Value

void

static protected void initializeTenancyForQueue(string|int|null $tenantId)

No description

Parameters

string|int|null $tenantId

Return Value

void

static protected void revertToPreviousState(JobFailed $event, Tenant|null $previousTenant)

No description

Parameters

JobFailed $event
Tenant|null $previousTenant

Return Value

void

protected void setUpPayloadGenerator()

No description

Return Value

void

void bootstrap(Tenant $tenant)

No description

Parameters

Tenant $tenant

Return Value

void

void revert()

No description

Return Value

void

array getPayload(string $connection)

No description

Parameters

string $connection

Return Value

array