class DatabaseFailedJobProvider implements CountableFailedJobProvider, FailedJobProviderInterface, PrunableFailedJobProvider

Methods

__construct(ConnectionResolverInterface $resolver, string|null $database, string $table)

Create a new database failed job provider.

int|string|null
log(string $connection, string $queue, string $payload, Throwable $exception)

Log a failed job into storage.

array
ids(string $queue = null)

Get the IDs of all of the failed jobs.

array
all()

Get a list of all of the failed jobs.

object|null
find(mixed $id)

Get a single failed job.

bool
forget(mixed $id)

Delete a single failed job from storage.

void
flush(int|null $hours = null)

Flush all of the failed jobs from storage.

int
prune(DateTimeInterface $before)

Prune all of the entries older than the given date.

int
count(string|null $connection = null, string|null $queue = null)

Count the failed jobs.

getTable()

Get a new query builder instance for the table.

Details

at line 18
__construct(ConnectionResolverInterface $resolver, string|null $database, string $table)

Create a new database failed job provider.

Parameters

ConnectionResolverInterface $resolver
string|null $database
string $table

at line 28
int|string|null log(string $connection, string $queue, string $payload, Throwable $exception)

Log a failed job into storage.

Parameters

string $connection
string $queue
string $payload
Throwable $exception

Return Value

int|string|null

at line 46
array ids(string $queue = null)

Get the IDs of all of the failed jobs.

Parameters

string $queue

Return Value

array

at line 58
array all()

Get a list of all of the failed jobs.

Return Value

array

at line 66
object|null find(mixed $id)

Get a single failed job.

Parameters

mixed $id

Return Value

object|null

at line 74
bool forget(mixed $id)

Delete a single failed job from storage.

Parameters

mixed $id

Return Value

bool

at line 82
void flush(int|null $hours = null)

Flush all of the failed jobs from storage.

Parameters

int|null $hours

Return Value

void

at line 92
int prune(DateTimeInterface $before)

Prune all of the entries older than the given date.

Parameters

DateTimeInterface $before

Return Value

int

at line 110
int count(string|null $connection = null, string|null $queue = null)

Count the failed jobs.

Parameters

string|null $connection
string|null $queue

Return Value

int

at line 121
Builder getTable()

Get a new query builder instance for the table.

Return Value

Builder