On this page
FileFailedJobProvider
class FileFailedJobProvider implements FailedJobProviderInterface, PrunableFailedJobProvider (View source)
Properties
protected string | $path | The file path where the failed job file should be stored. |
|
protected int | $limit | The maximum number of failed jobs to retain. |
|
protected Closure | $lockProviderResolver | The lock provider resolver. |
Methods
void | __construct(string $path, int $limit = 100, Closure|null $lockProviderResolver = null) Create a new database failed job provider. |
|
string|int|null | log(string $connection, string $queue, string $payload, Throwable $exception) Log a failed job into storage. |
|
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. |
|
mixed | lock(Closure $callback) Execute the given callback while holding a lock. |
|
array | read() Read the failed jobs file. |
|
void | write(array $jobs) Write the given array of jobs to the failed jobs file. |
Details
void __construct(string $path, int $limit = 100, Closure|null $lockProviderResolver = null)
Create a new database failed job provider.
string|int|null log(string $connection, string $queue, string $payload, Throwable $exception)
Log a failed job into storage.
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.
protected mixed lock(Closure $callback)
Execute the given callback while holding a lock.
protected array read()
Read the failed jobs file.
protected void write(array $jobs)
Write the given array of jobs to the failed jobs file.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Queue/Failed/FileFailedJobProvider.html