PHP Класс Queue\Shell\QueueShell

Наследование: extends Cake\Console\Shell
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$modelClass string

Защищенные свойства (Protected)

Свойство Тип Описание
$_exit boolean
$_taskConf array

Открытые методы

Метод Описание
__destruct ( ) Destructor, removes pid-file
add ( ) : void Look for a Queue Task of hte passed name and try to call add() on it.
clean ( ) : void Manually trigger a Finished job cleanup.
getOptionParser ( ) : Cake\Console\ConsoleOptionParser Get option parser method to parse commandline options
initialize ( ) : void Overwrite shell initialize to dynamically load all Queue Related Tasks.
install ( ) : void Set up tables
main ( ) : void Output some basic usage Info.
reset ( ) : void Manually reset (failed) jobs for re-run.
runworker ( ) : void Run a QueueWorker loop.
settings ( ) : void Display current settings
stats ( ) : void Display some statistics about Finished Jobs.
uninstall ( ) : void Remove table and kill workers

Защищенные методы

Метод Описание
_displayAvailableTasks ( ) : void
_exit ( integer $signal ) : void Signal handling to queue worker for clean shutdown
_getTaskConf ( ) : array Returns a List of available QueueTasks and their individual configurations.
_log ( string $type, integer | null $pid = null ) : void Timestamped log.
_logError ( string $message ) : void
_notify ( ) : void Timestamped notification.
_taskName ( string $task ) : string Output the task without Queue or Task example: QueueImageTask becomes Image on display

Описание методов

__destruct() публичный Метод

Destructor, removes pid-file
public __destruct ( )

_displayAvailableTasks() защищенный Метод

protected _displayAvailableTasks ( ) : void
Результат void

_exit() защищенный Метод

Signal handling to queue worker for clean shutdown
protected _exit ( integer $signal ) : void
$signal integer not used
Результат void

_getTaskConf() защищенный Метод

Returns a List of available QueueTasks and their individual configurations.
protected _getTaskConf ( ) : array
Результат array

_log() защищенный Метод

Timestamped log.
protected _log ( string $type, integer | null $pid = null ) : void
$type string Log type
$pid integer | null PID of the process
Результат void

_logError() защищенный Метод

protected _logError ( string $message ) : void
$message string
Результат void

_notify() защищенный Метод

Timestamped notification.
protected _notify ( ) : void
Результат void

_taskName() защищенный Метод

Output the task without Queue or Task example: QueueImageTask becomes Image on display
protected _taskName ( string $task ) : string
$task string Task name
Результат string Cleaned task name

add() публичный Метод

A QueueTask may provide an add function to enable the user to create new jobs via commandline.
public add ( ) : void
Результат void

clean() публичный Метод

Manually trigger a Finished job cleanup.
public clean ( ) : void
Результат void

getOptionParser() публичный Метод

Get option parser method to parse commandline options
public getOptionParser ( ) : Cake\Console\ConsoleOptionParser
Результат Cake\Console\ConsoleOptionParser

initialize() публичный Метод

Overwrite shell initialize to dynamically load all Queue Related Tasks.
public initialize ( ) : void
Результат void

install() публичный Метод

Set up tables
См. также: readme
public install ( ) : void
Результат void

main() публичный Метод

Output some basic usage Info.
public main ( ) : void
Результат void

reset() публичный Метод

Careful, this should not be done while a queue task is being run.
public reset ( ) : void
Результат void

runworker() публичный Метод

Runs a Queue Worker process which will try to find unassigned jobs in the queue which it may run and try to fetch and execute them.
public runworker ( ) : void
Результат void

settings() публичный Метод

Display current settings
public settings ( ) : void
Результат void

stats() публичный Метод

Display some statistics about Finished Jobs.
public stats ( ) : void
Результат void

uninstall() публичный Метод

Remove table and kill workers
public uninstall ( ) : void
Результат void

Описание свойств

$_exit защищенное свойство

protected bool $_exit
Результат boolean

$_taskConf защищенное свойство

protected array $_taskConf
Результат array

$modelClass публичное свойство

public string $modelClass
Результат string