\think\queueWorker

Summary

Methods
Properties
Constants
pop()
process()
sleep()
No public properties found
No constants found
getNextJob()
logFailedJob()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

pop()

pop(string  $queue = null, integer  $delay, integer  $sleep = 3, integer  $maxTries) : array

执行下个任务

Parameters

string $queue
integer $delay
integer $sleep
integer $maxTries

Returns

array

process()

process(\think\queue\Job  $job, integer  $maxTries, integer  $delay) : array

Process a given job from the queue.

Parameters

\think\queue\Job $job
integer $maxTries
integer $delay

Throws

\Exception

Returns

array

sleep()

sleep(integer  $seconds) : void

Sleep the script for a given number of seconds.

Parameters

integer $seconds

getNextJob()

getNextJob(string  $queue) : \think\queue\Job

获取下个任务

Parameters

string $queue

Returns

\think\queue\Job

logFailedJob()

logFailedJob(\Think\Queue\Job  $job) : array

Log a failed job into storage.

Parameters

\Think\Queue\Job $job

Returns

array