trait Batchable

Traits

Properties

bool|null $viaOutbox

Whether to stage the job through the transactional outbox.

from  InteractsWithQueueOutbox
string|null $outboxDatabase

The database connection that owns the staged job.

from  InteractsWithQueueOutbox
string|null $batchId

The batch ID (if applicable).

Methods

viaOutbox()

Dispatch the job through the transactional outbox.

withoutOutbox()

Dispatch the job without the transactional outbox.

onOutboxDatabase(UnitEnum|string $connection)

Stage the job on the given database connection.

Batch|null
batch()

Get the batch instance for the job, if applicable.

bool
batching()

Determine if the batch is still active and processing.

withBatchId(string $batchId)

Set the batch ID on the job.

array
withFakeBatch(string $id = '', string $name = '', int $totalJobs = 0, int $pendingJobs = 0, int $failedJobs = 0, array $failedJobIds = [], array $options = [], CarbonImmutable|null $createdAt = null, CarbonImmutable|null $cancelledAt = null, CarbonImmutable|null $finishedAt = null)

Indicate that the job should use a fake batch.

Details

InteractsWithQueueOutbox viaOutbox()

Dispatch the job through the transactional outbox.

InteractsWithQueueOutbox withoutOutbox()

Dispatch the job without the transactional outbox.

InteractsWithQueueOutbox onOutboxDatabase(UnitEnum|string $connection)

Stage the job on the given database connection.

Parameters

UnitEnum|string $connection

Return Value

InteractsWithQueueOutbox

at line 29
Batch|null batch()

Get the batch instance for the job, if applicable.

Return Value

Batch|null

at line 45
bool batching()

Determine if the batch is still active and processing.

Return Value

bool

at line 57
Batchable withBatchId(string $batchId)

Set the batch ID on the job.

Parameters

string $batchId

Return Value

Batchable

at line 69
array withFakeBatch(string $id = '', string $name = '', int $totalJobs = 0, int $pendingJobs = 0, int $failedJobs = 0, array $failedJobIds = [], array $options = [], CarbonImmutable|null $createdAt = null, CarbonImmutable|null $cancelledAt = null, CarbonImmutable|null $finishedAt = null)

Indicate that the job should use a fake batch.

Parameters

string $id
string $name
int $totalJobs
int $pendingJobs
int $failedJobs
array $failedJobIds
array $options
CarbonImmutable|null $createdAt
CarbonImmutable|null $cancelledAt
CarbonImmutable|null $finishedAt

Return Value

array