interface BatchRepository

Methods

array
get(int $limit, mixed $before)

Retrieve a list of batches.

Batch|null
find(int|string $batchId)

Retrieve information about an existing batch.

store(PendingBatch $batch)

Store a new pending batch.

void
incrementTotalJobs(int|string $batchId, int $amount)

Increment the total number of jobs within the batch.

decrementPendingJobs(int|string $batchId, string $jobId)

Decrement the total number of pending jobs for the batch.

incrementFailedJobs(int|string $batchId, string $jobId)

Increment the total number of failed jobs for the batch.

void
markAsFinished(int|string $batchId)

Mark the batch that has the given ID as finished.

void
cancel(int|string $batchId)

Cancel the batch that has the given ID.

void
delete(int|string $batchId)

Delete the batch that has the given ID.

mixed
transaction(Closure $callback)

Execute the given Closure within a storage specific transaction.

void
rollBack()

Rollback the last database transaction for the connection.

Details

at line 16
array get(int $limit, mixed $before)

Retrieve a list of batches.

Parameters

int $limit
mixed $before

Return Value

array

at line 21
Batch|null find(int|string $batchId)

Retrieve information about an existing batch.

Parameters

int|string $batchId

Return Value

Batch|null

at line 26
Batch store(PendingBatch $batch)

Store a new pending batch.

Parameters

PendingBatch $batch

Return Value

Batch

at line 31
void incrementTotalJobs(int|string $batchId, int $amount)

Increment the total number of jobs within the batch.

Parameters

int|string $batchId
int $amount

Return Value

void

at line 36
UpdatedBatchJobCounts|null decrementPendingJobs(int|string $batchId, string $jobId)

Decrement the total number of pending jobs for the batch.

Parameters

int|string $batchId
string $jobId

Return Value

UpdatedBatchJobCounts|null

at line 41
UpdatedBatchJobCounts|null incrementFailedJobs(int|string $batchId, string $jobId)

Increment the total number of failed jobs for the batch.

Parameters

int|string $batchId
string $jobId

Return Value

UpdatedBatchJobCounts|null

at line 46
void markAsFinished(int|string $batchId)

Mark the batch that has the given ID as finished.

Parameters

int|string $batchId

Return Value

void

at line 51
void cancel(int|string $batchId)

Cancel the batch that has the given ID.

Parameters

int|string $batchId

Return Value

void

at line 56
void delete(int|string $batchId)

Delete the batch that has the given ID.

Parameters

int|string $batchId

Return Value

void

at line 66
mixed transaction(Closure $callback)

Execute the given Closure within a storage specific transaction.

Parameters

Closure $callback

Return Value

mixed

at line 71
void rollBack()

Rollback the last database transaction for the connection.

Return Value

void