class Illuminate / Queue / Failed / FileFailedJobProvider

FileFailedJobProvider

Implements

Properties

protected

$path string

The file path where the failed job file should be stored.

Default: null
protected

$limit int

The maximum number of failed jobs to retain.

Default: null
protected

$lockProviderResolver Closure

The lock provider resolver.

Default: null

Methods

public

__construct ( $path , $limit , Closure $lockProviderResolver ) : void

Create a new database failed job provider.

Parameters

  • $path string
  • $limit int
  • $lockProviderResolver Closure |null
public

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

Log a failed job into storage.

Parameters

  • $connection string
  • $queue string
  • $payload string
  • $exception Throwable
public

all ( ) : array

Get a list of all of the failed jobs.

public

find ( $id ) : object|null

Get a single failed job.

Parameters

  • $id mixed
public

forget ( $id ) : bool

Delete a single failed job from storage.

Parameters

  • $id mixed
public

flush ( $hours ) : void

Flush all of the failed jobs from storage.

Parameters

  • $hours int|null
public

prune ( DateTimeInterface $before ) : int

Prune all of the entries older than the given date.

Parameters

protected

lock ( Closure $callback ) : mixed

Execute the given callback while holding a lock.

Parameters

protected

read ( ) : array

Read the failed jobs file.

protected

write ( array $jobs ) : void

Write the given array of jobs to the failed jobs file.

Parameters

  • $jobs array