Method | Description | |
---|---|---|
__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 |
public __construct ( DateTime $start ) | ||
$start | DateTime | Start time in system timezone |
public static ensureBrokerRunning ( ) : integer | ||
return | integer | Returns non false if broker is running |
public getAllTasks ( ) : Scalr\System\Zmq\Cron\ServiceIterator | ||
return | Scalr\System\Zmq\Cron\ServiceIterator |
public getScheduled ( ) : Scalr\System\Zmq\Cron\ScheduledServiceIterator | ||
return | Scalr\System\Zmq\Cron\ScheduledServiceIterator |
public static getStartBrokerCommand ( ) : string | ||
return | string | Returns start broker cmd |
public static getStartClientCommand ( ) : string | ||
return | string | Returns start client cmd |
public static getStartPhpScriptCommand ( string $script ) : string | ||
$script | string | relative path from app folder |
return | string | Returns start php script CMD |
public static getStartWorkerCommand ( ) : string | ||
return | string | Returns start worker cmd |
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 |