PHP 클래스 Queue\Shell\QueueShell

상속: extends Cake\Console\Shell
파일 보기 프로젝트 열기: dereuromark/cakephp-queue 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$modelClass string

보호된 프로퍼티들

프로퍼티 타입 설명
$_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