Properties

$options

$options : 

Type

$redis

$redis : \Redis

Type

\Redis

Methods

push()

push(  $job,   $data = '',   $queue = null) 

Parameters

$job
$data
$queue

later()

later(  $delay,   $job,   $data = '',   $queue = null) 

Parameters

$delay
$job
$data
$queue

pop()

pop(  $queue = null) 

Parameters

$queue

marshal()

marshal() 

__construct()

__construct(array  $options) 

Parameters

array $options

release()

release(string  $queue, string  $payload, integer  $delay, integer  $attempts) : void

重新发布任务

Parameters

string $queue
string $payload
integer $delay
integer $attempts

pushRaw()

pushRaw(  $payload,   $queue = null) 

Parameters

$payload
$queue

deleteReserved()

deleteReserved(string  $queue, string  $job) : void

删除任务

Parameters

string $queue
string $job

migrateExpiredJobs()

migrateExpiredJobs(string  $from, string  $to, boolean  $attempt = true) 

移动延迟任务

Parameters

string $from
string $to
boolean $attempt

createPayload()

createPayload(  $job,   $data = '',   $queue = null) 

Parameters

$job
$data
$queue

createPlainPayload()

createPlainPayload(  $job,   $data) 

Parameters

$job
$data

setMeta()

setMeta(  $payload,   $key,   $value) 

Parameters

$payload
$key
$value

transaction()

transaction(\Closure  $closure) 

redis事务

Parameters

\Closure $closure

getExpiredJobs()

getExpiredJobs(string  $from, integer  $time) : array

获取所有到期任务

Parameters

string $from
integer $time

Returns

array

removeExpiredJobs()

removeExpiredJobs(string  $from, integer  $time) : void

删除过期任务

Parameters

string $from
integer $time

pushExpiredJobsOntoNewQueue()

pushExpiredJobsOntoNewQueue(string  $to, array  $jobs, boolean  $attempt = true) 

重新发布到期任务

Parameters

string $to
array $jobs
boolean $attempt

getRandomId()

getRandomId() : string

随机id

Returns

string

getQueue()

getQueue(string|null  $queue) : string

获取队列名

Parameters

string|null $queue

Returns

string