FailedJobProvider
class FailedJobProvider implements FailedJobProviderInterface, CountableFailedJobProvider, PrunableFailedJobProvider (View source)
Properties
| protected Queue | $queue | The connected queue instance. |
|
| protected array<string, object> | $loadedFailedJobs | The loaded failed jobs keyed by ID. |
Methods
Create a new instance.
Get the IDs of all of the failed jobs.
Get a list of all of the failed jobs.
Get a single failed job.
Build an iterator for the failed jobs from the given URL.
Resolve the failed jobs payload for the given URL.
Fetch the failed jobs from the given URL.
Delete a single failed job from storage.
Flush the failed jobs from storage.
Count the failed jobs.
Details
__construct(FailedJobProviderInterface $failer, Events $events, StringEncrypter $encrypter, ExceptionReporter|null $reporter = null)
Create a new instance.
string|int|null
log(string $connection, string $queue, string $payload, Throwable $exception)
Log a failed job into storage.
list<string|int>
ids(string|null $queue = null)
Get the IDs of all of the failed jobs.
list<object>
all()
Get a list of all of the failed jobs.
object|null
find(mixed $id)
Get a single failed job.
protected Iterator
failedJobsIterator(string $url)
Build an iterator for the failed jobs from the given URL.
protected object
resolveFailedJobsPayload(string $url)
Resolve the failed jobs payload for the given URL.
protected Response
fetchFailedJobs(string $url)
Fetch the failed jobs from the given URL.
bool
forget(mixed $id)
Delete a single failed job from storage.
void
flush(int|null $hours = null, string|null $queue = null)
Flush the failed jobs from storage.
int
count(string|null $connection = null, string|null $queue = null)
Count the failed jobs.
int
prune(DateTimeInterface $before)
Prune all of the entries older than the given date.
$this
setQueue(Queue $queue)
Set the connected queue instance.