RedisJobRepository
class RedisJobRepository implements JobRepository
Traits
Properties
| array | $keys | The keys stored on the job hashes. |
|
| int | $recentFailedJobExpires | The number of minutes until recently failed jobs should be purged. |
|
| int | $recentJobExpires | The number of minutes until recent jobs should be purged. |
|
| int | $pendingJobExpires | The number of minutes until pending jobs should be purged. |
|
| int | $completedJobExpires | The number of minutes until completed and silenced jobs should be purged. |
|
| int | $failedJobExpires | The number of minutes until failed jobs should be purged. |
|
| int | $monitoredJobExpires | The number of minutes until monitored jobs should be purged. |
Methods
Execute commands in a pipeline, falling back to a transaction.
Get the next job ID that should be assigned.
Get the total count of recent jobs.
Get the total count of failed jobs.
Get a chunk of recent jobs.
Get a chunk of failed jobs.
Get a chunk of pending jobs.
Get a chunk of completed jobs.
Get a chunk of silenced jobs.
Get the count of recent jobs.
Get the count of failed jobs.
Get the count of pending jobs.
Get the count of completed jobs.
Get the count of silenced jobs.
Get the count of the recently failed jobs.
Get a chunk of jobs from the given type set.
Get the number of jobs in a given type set.
Get the number of minutes to count for a given type set.
Retrieve the jobs with the given IDs.
Mark the job as released / pending.
Mark the job as completed and monitored.
Mark the given jobs as released / pending.
Handle the storage of a completed job.
Update the retry status of a job's parent.
Update the retry status of a job in a retry array.
Delete the given monitored jobs by IDs.
Trim the recent job list.
Trim the failed job list.
Trim the monitored job list.
Find a failed job by ID.
Mark the job as failed.
Store the look-up references for a job.
Remove the look-up references for a job.
Store the retry job ID on the original job record.
Delete a failed job by ID.
Delete pending and reserved jobs for a queue.
Get the Redis connection instance.
Details
in
UsesClusterAwarePipeline at line 12
protected array
pipeline(callable $callback)
Execute commands in a pipeline, falling back to a transaction.
at line 64
__construct(Factory $redis)
Create a new repository instance.
at line 78
string
nextJobId()
Get the next job ID that should be assigned.
at line 86
int
totalRecent()
Get the total count of recent jobs.
at line 94
int
totalFailed()
Get the total count of failed jobs.
at line 102
Collection
getRecent(int|null $afterIndex = null)
Get a chunk of recent jobs.
at line 110
Collection
getFailed(int|null $afterIndex = null)
Get a chunk of failed jobs.
at line 118
Collection
getPending(int|null $afterIndex = null)
Get a chunk of pending jobs.
at line 126
Collection
getCompleted(int|null $afterIndex = null)
Get a chunk of completed jobs.
at line 134
Collection
getSilenced(int|null $afterIndex = null)
Get a chunk of silenced jobs.
at line 142
int
countRecent()
Get the count of recent jobs.
at line 150
int
countFailed()
Get the count of failed jobs.
at line 158
int
countPending()
Get the count of pending jobs.
at line 166
int
countCompleted()
Get the count of completed jobs.
at line 174
int
countSilenced()
Get the count of silenced jobs.
at line 182
int
countRecentlyFailed()
Get the count of the recently failed jobs.
at line 190
protected Collection
getJobsByType(string $type, int|null $afterIndex)
Get a chunk of jobs from the given type set.
at line 204
protected int
countJobsByType(string $type)
Get the number of jobs in a given type set.
at line 218
protected int
minutesForType(string $type)
Get the number of minutes to count for a given type set.
at line 233
Collection
getJobs(array $ids, mixed $indexFrom = 0)
Retrieve the jobs with the given IDs.
at line 251
protected Collection
indexJobs(Collection $jobs, int $indexFrom)
Index the given jobs from the given index.
at line 267
void
pushed(string $connection, string $queue, JobPayload $payload)
Insert the job into storage.
at line 296
void
reserved(string $connection, string $queue, JobPayload $payload)
Mark the job as reserved.
at line 314
void
released(string $connection, string $queue, JobPayload $payload, int $delay = 0)
Mark the job as released / pending.
at line 330
void
remember(string $connection, string $queue, JobPayload $payload)
Mark the job as completed and monitored.
at line 358
void
migrated(string $connection, string $queue, Collection $payloads)
Mark the given jobs as released / pending.
at line 378
void
completed(JobPayload $payload, bool $failed = false, bool $silenced = false)
Handle the storage of a completed job.
at line 403
protected void
updateRetryInformationOnParent(JobPayload $payload, bool $failed)
Update the retry status of a job's parent.
at line 423
protected array
updateRetryStatus(JobPayload $payload, array $retries, bool $failed)
Update the retry status of a job in a retry array.
at line 435
void
deleteMonitored(array $ids)
Delete the given monitored jobs by IDs.
at line 447
void
trimRecentJobs()
Trim the recent job list.
at line 485
void
trimFailedJobs()
Trim the failed job list.
at line 497
void
trimMonitoredJobs()
Trim the monitored job list.
at line 509
stdClass|null
findFailed(string $id)
Find a failed job by ID.
at line 530
void
failed(Throwable $exception, string $connection, string $queue, JobPayload $payload)
Mark the job as failed.
at line 566
protected void
storeJobReference(mixed $pipe, string $key, JobPayload $payload)
Store the look-up references for a job.
at line 574
protected void
removeJobReference(mixed $pipe, string $key, JobPayload $payload)
Remove the look-up references for a job.
at line 582
void
storeRetryReference(string $id, string $retryId)
Store the retry job ID on the original job record.
at line 598
int
deleteFailed(string $id)
Delete a failed job by ID.
at line 609
int
purge(string $queue)
Delete pending and reserved jobs for a queue.
at line 635
protected RedisProxy
connection()
Get the Redis connection instance.