\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 : int

Type

int

$maxTries

$maxTries : int

Type

int

$workerCommand

$workerCommand : string

Type

string

$outputHandler

$outputHandler : \Closure|null

Type

Closure|null

Methods

__construct()

__construct(string  $commandPath) : mixed

Parameters

string $commandPath

Returns

mixed —

listen()

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

Parameters

string $queue
string $delay
string $memory
int $timeout

runProcess()

runProcess(\Think\Process  $process, int  $memory) : mixed

Parameters

\Think\Process $process
int $memory

Returns

mixed —

makeProcess()

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

Parameters

string $queue
int $delay
int $memory
int $timeout

Returns

\think\Process —

memoryExceeded()

memoryExceeded(int  $memoryLimit) : bool

Parameters

int $memoryLimit

Returns

bool —

stop()

stop() : void

setOutputHandler()

setOutputHandler(\Closure  $outputHandler) : void

Parameters

\Closure $outputHandler

getSleep()

getSleep() : int

Returns

int —

setSleep()

setSleep(int  $sleep) : void

Parameters

int $sleep

setMaxTries()

setMaxTries(int  $tries) : void

Parameters

int $tries

handleWorkerOutput()

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

Parameters

int $type
string $line