\think\queueListener

Summary

Methods
Properties
Constants
__construct()
listen()
runProcess()
makeProcess()
memoryExceeded()
stop()
setOutputHandler()
getSleep()
setSleep()
setMaxTries()
No public properties found
No constants found
handleWorkerOutput()
$commandPath
$sleep
$maxTries
$workerCommand
$outputHandler
N/A
No private methods found
No private properties found
N/A

Properties

$commandPath

$commandPath : string

Type

string

$sleep

$sleep : integer

Type

integer

$maxTries

$maxTries : integer

Type

integer

$workerCommand

$workerCommand : string

Type

string

$outputHandler

$outputHandler : \Closure|null

Type

\Closure|null

Methods

__construct()

__construct(string  $commandPath) 

Parameters

string $commandPath

listen()

listen(string  $queue, string  $delay, string  $memory, integer  $timeout = 60) : void

Parameters

string $queue
string $delay
string $memory
integer $timeout

runProcess()

runProcess(\Think\Process  $process, integer  $memory) 

Parameters

\Think\Process $process
integer $memory

makeProcess()

makeProcess(string  $queue, integer  $delay, integer  $memory, integer  $timeout) : \think\Process

Parameters

string $queue
integer $delay
integer $memory
integer $timeout

Returns

\think\Process

memoryExceeded()

memoryExceeded(integer  $memoryLimit) : boolean

Parameters

integer $memoryLimit

Returns

boolean

stop()

stop() : void

setOutputHandler()

setOutputHandler(\Closure  $outputHandler) : void

Parameters

\Closure $outputHandler

getSleep()

getSleep() : integer

Returns

integer

setSleep()

setSleep(integer  $sleep) : void

Parameters

integer $sleep

setMaxTries()

setMaxTries(integer  $tries) : void

Parameters

integer $tries

handleWorkerOutput()

handleWorkerOutput(integer  $type, string  $line) : void

Parameters

integer $type
string $line