PHP 클래스 Scalr\System\Zmq\Cron\Launcher

부터: 5.0.1 (15.09.2014)
저자: Vitaliy Demidov ([email protected])
상속: use trait Scalr\LoggerAwareTrait
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( DateTime $start ) Constructor
ensureBrokerRunning ( ) : integer Makes sure the broker is running.
getAllTasks ( ) : Scalr\System\Zmq\Cron\ServiceIterator Gets the list of all tasks
getScheduled ( ) : Scalr\System\Zmq\Cron\ScheduledServiceIterator Gets the list of the tasks which are due to run
getStartBrokerCommand ( ) : string Gets start broker command
getStartClientCommand ( ) : string Gets start client command
getStartPhpScriptCommand ( string $script ) : string Gets start php script command
getStartWorkerCommand ( ) : string Gets start worker command
healthcheck ( ) Performs health chek
launch ( ) : integer Launches tasks are due to run
terminateBroker ( ) Terminates broker
terminateByFilter ( string $cmd, string $gracefully = true ) Gracefully terminates processes by start command key
terminateClients ( ) Terminates all clients

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( DateTime $start )
$start DateTime Start time in system timezone

ensureBrokerRunning() 공개 정적인 메소드

If it isn't running method will start it.
public static ensureBrokerRunning ( ) : integer
리턴 integer Returns non false if broker is running

getAllTasks() 공개 메소드

Gets the list of all tasks
public getAllTasks ( ) : Scalr\System\Zmq\Cron\ServiceIterator
리턴 Scalr\System\Zmq\Cron\ServiceIterator

getScheduled() 공개 메소드

Gets the list of the tasks which are due to run
public getScheduled ( ) : Scalr\System\Zmq\Cron\ScheduledServiceIterator
리턴 Scalr\System\Zmq\Cron\ScheduledServiceIterator

getStartBrokerCommand() 공개 정적인 메소드

Gets start broker command
public static getStartBrokerCommand ( ) : string
리턴 string Returns start broker cmd

getStartClientCommand() 공개 정적인 메소드

Gets start client command
public static getStartClientCommand ( ) : string
리턴 string Returns start client cmd

getStartPhpScriptCommand() 공개 정적인 메소드

Gets start php script command
public static getStartPhpScriptCommand ( string $script ) : string
$script string relative path from app folder
리턴 string Returns start php script CMD

getStartWorkerCommand() 공개 정적인 메소드

Gets start worker command
public static getStartWorkerCommand ( ) : string
리턴 string Returns start worker cmd

healthcheck() 공개 정적인 메소드

Performs health chek
public static healthcheck ( )

launch() 공개 메소드

Launches tasks are due to run
public launch ( ) : integer
리턴 integer Returns the number of the launched tasks

terminateBroker() 공개 정적인 메소드

Terminates broker
public static terminateBroker ( )

terminateByFilter() 공개 정적인 메소드

Gracefully terminates processes by start command key
public static terminateByFilter ( string $cmd, string $gracefully = true )
$cmd string CMD used as the start
$gracefully string optional Whether it should send SIGTERM rather than kill -9 forcefully

terminateClients() 공개 정적인 메소드

Terminates all clients
public static terminateClients ( )