class Illuminate / Queue / RedisQueue
You are viewing an older version of the documentation. For the latest, please visit master documentation.

RedisQueue

Extends

Implements

Properties

protected

$redis Factory

The Redis factory implementation.

Default: null
protected

$connection string

The connection name.

Default: null
protected

$default string

The name of the default queue.

Default: null
protected

$retryAfter int|null

The expiration time of a job.

Default: 60
protected

$blockFor int|null

The maximum number of seconds to block for a job.

Default: null

Methods

public

__construct ( Factory $redis , $default , $connection , $retryAfter , $blockFor , $dispatchAfterCommit ) : void

Create a new Redis queue instance.

Parameters

  • $redis Factory
  • $default string
  • $connection string|null
  • $retryAfter int
  • $blockFor int|null
  • $dispatchAfterCommit bool
public

size ( $queue ) : int

Get the size of the queue.

Parameters

  • $queue string|null
public

bulk ( $jobs , $data , $queue ) : void

Push an array of jobs onto the queue.

Parameters

  • $jobs array
  • $data mixed
  • $queue string|null
public

push ( $job , $data , $queue ) : mixed

Push a new job onto the queue.

Parameters

  • $job object|string
  • $data mixed
  • $queue string|null
public

pushRaw ( $payload , $queue , array $options ) : mixed

Push a raw payload onto the queue.

Parameters

  • $payload string
  • $queue string|null
  • $options array
public

later ( $delay , $job , $data , $queue ) : mixed

Push a new job onto the queue after a delay.

Parameters

protected

laterRaw ( $delay , $payload , $queue ) : mixed

Push a raw job onto the queue after a delay.

Parameters

protected

createPayloadArray ( $job , $queue , $data ) : array

Create a payload string from the given job and data.

Parameters

  • $job string
  • $queue string
  • $data mixed
public

pop ( $queue ) : Job |null

Pop the next job off of the queue.

Parameters

  • $queue string|null
protected

migrate ( $queue ) : void

Migrate any delayed or expired jobs onto the primary queue.

Parameters

  • $queue string
public

migrateExpiredJobs ( $from , $to ) : array

Migrate the delayed jobs that are ready to the regular queue.

Parameters

  • $from string
  • $to string
protected

retrieveNextJob ( $queue , $block ) : array

Retrieve the next job from the queue.

Parameters

  • $queue string
  • $block bool
public

deleteReserved ( $queue , $job ) : void

Delete a reserved job from the queue.

Parameters

public

deleteAndRelease ( $queue , $job , $delay ) : void

Delete a reserved job from the reserved queue and release it.

Parameters

public

clear ( $queue ) : int

Delete all of the jobs from the queue.

Parameters

  • $queue string
protected

getRandomId ( ) : string

Get a random ID string.

public

getQueue ( $queue ) : string

Get the queue or return the default.

Parameters

  • $queue string|null
public

getConnection ( ) : Connection

Get the connection for the queue.

public

getRedis ( ) : Factory

Get the underlying Redis instance.