class Illuminate / Queue / RedisQueue
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

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
protected

$migrationBatchSize int

The batch size to use when migrating delayed / expired jobs onto the primary queue.

Negative values are infinite.

Default: -1

Methods

public

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

Create a new Redis queue instance.

Parameters

  • $redis Factory
  • $default string
  • $connection string|null
  • $retryAfter int
  • $blockFor int|null
  • $dispatchAfterCommit bool
  • $migrationBatchSize int
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 (n) seconds.

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
  • $limit int
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.