Redis
extends AbstractAdapter
in package
Redis queue adapter class
Tags
Table of Contents
- $redis : Redis
- Redis object
- __construct() : mixed
- Constructor
- clear() : void
- Clear jobs off of the queue stack
- clearFailed() : void
- Clear failed jobs off of the queue stack
- failed() : void
- Move failed job to failed queue stack
- flush() : void
- Flush all jobs off of the queue stack
- flushAll() : void
- Flush all pop queue items
- flushFailed() : void
- Flush all failed jobs off of the queue stack
- getCompletedJob() : array<string|int, mixed>
- Get queue completed job
- getCompletedJobs() : array<string|int, mixed>
- Get queue completed jobs
- getFailedJob() : array<string|int, mixed>
- Get failed job from queue stack by job ID
- getFailedJobs() : array<string|int, mixed>
- Get queue jobs
- getJob() : array<string|int, mixed>
- Get job from queue stack by job ID
- getJobs() : array<string|int, mixed>
- Get queue jobs
- hasCompletedJob() : bool
- Check if queue stack has completed job
- hasCompletedJobs() : bool
- Check if queue has completed jobs
- hasFailedJob() : bool
- Check if queue stack has failed job
- hasFailedJobs() : bool
- Check if queue adapter has failed jobs
- hasJob() : bool
- Check if queue stack has job
- hasJobs() : bool
- Check if queue has jobs
- pop() : void
- Pop job off of queue stack
- push() : string
- Push job onto queue stack
- redis() : Redis
- Get the redis object.
- updateJob() : void
- Update job from queue stack by job ID
Properties
$redis
Redis object
protected
Redis
$redis
= null
Methods
__construct()
Constructor
public
__construct([string $host = 'localhost' ][, int $port = 6379 ]) : mixed
Instantiate the redis queue object
Parameters
- $host : string = 'localhost'
- $port : int = 6379
Tags
Return values
mixed —clear()
Clear jobs off of the queue stack
public
clear(mixed $queue[, bool $all = false ]) : void
Parameters
- $queue : mixed
- $all : bool = false
Return values
void —clearFailed()
Clear failed jobs off of the queue stack
public
clearFailed(mixed $queue) : void
Parameters
- $queue : mixed
Return values
void —failed()
Move failed job to failed queue stack
public
failed(mixed $queue, mixed $jobId[, Exception $exception = null ]) : void
Parameters
- $queue : mixed
- $jobId : mixed
- $exception : Exception = null
Return values
void —flush()
Flush all jobs off of the queue stack
public
flush([bool $all = false ]) : void
Parameters
- $all : bool = false
Return values
void —flushAll()
Flush all pop queue items
public
flushAll() : void
Return values
void —flushFailed()
Flush all failed jobs off of the queue stack
public
flushFailed() : void
Return values
void —getCompletedJob()
Get queue completed job
public
getCompletedJob(mixed $jobId[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $jobId : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getCompletedJobs()
Get queue completed jobs
public
getCompletedJobs(mixed $queue[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $queue : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getFailedJob()
Get failed job from queue stack by job ID
public
getFailedJob(mixed $jobId[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $jobId : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getFailedJobs()
Get queue jobs
public
getFailedJobs(mixed $queue[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $queue : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getJob()
Get job from queue stack by job ID
public
getJob(mixed $jobId[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $jobId : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getJobs()
Get queue jobs
public
getJobs(mixed $queue[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $queue : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —hasCompletedJob()
Check if queue stack has completed job
public
hasCompletedJob(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasCompletedJobs()
Check if queue has completed jobs
public
hasCompletedJobs(mixed $queue) : bool
Parameters
- $queue : mixed
Return values
bool —hasFailedJob()
Check if queue stack has failed job
public
hasFailedJob(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasFailedJobs()
Check if queue adapter has failed jobs
public
hasFailedJobs(mixed $queue) : bool
Parameters
- $queue : mixed
Return values
bool —hasJob()
Check if queue stack has job
public
hasJob(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasJobs()
Check if queue has jobs
public
hasJobs(mixed $queue) : bool
Parameters
- $queue : mixed
Return values
bool —pop()
Pop job off of queue stack
public
pop(mixed $jobId) : void
Parameters
- $jobId : mixed
Return values
void —push()
Push job onto queue stack
public
push(mixed $queue, mixed $job[, mixed $priority = null ]) : string
Parameters
- $queue : mixed
- $job : mixed
- $priority : mixed = null
Return values
string —redis()
Get the redis object.
public
redis() : Redis
Return values
Redis —updateJob()
Update job from queue stack by job ID
public
updateJob(mixed $jobId[, mixed $completed = false ][, mixed $increment = false ]) : void
Parameters
- $jobId : mixed
- $completed : mixed = false
- $increment : mixed = false