Свойство | Тип | Описание | |
---|---|---|---|
$name | string | Task name | |
$queue | ArrayObject | Task queue |
Метод | Описание | |
---|---|---|
__construct ( ) | Constructor | |
addWorker ( $address = null ) | ||
checkMemoryUsage ( ) | ||
config ( ) : object | Gets config for this cron | |
getAuditLoggerConfig ( ) | ||
getName ( ) | ||
getReplicaAccounts ( ) : array | Gets accounts to replicate a service to process its queue in the separate workers | |
getReplicaTypes ( string $name = 'type', string $regex = null ) : array | Gets types to replicate a service to process its queue in the separate workers | |
getScalrService ( ) : |
Gets Scalr service | |
isServiceRegistered ( string $serviceName = null ) : integer | boolean | Checks whether service is registered with the broker | |
launch ( ) | ||
onCompleted ( ) | ||
onResponse ( Scalr\System\Zmq\Cron\AbstractPayload $payload ) | ||
run ( ) | ||
shutdown ( ) |
Метод | Описание | |
---|---|---|
launchClient ( ) : integer | Runs ZMQ MDP Asynchronous Client | |
launchWorkers ( string $address = null ) : integer | It launches pool of workers |
Метод | Описание | |
---|---|---|
_launchWorkers ( string $address = null, integer $workers = null ) : integer | It launches pool of workers | |
terminateWorker ( integer $pid ) | Terminates one worker by specified pid |
public getReplicaAccounts ( ) : array | ||
Результат | array | Returns the list of the accounts to replicate |
public getScalrService ( ) : |
||
Результат | Returns ScalrService instance for the current task |
protected launchClient ( ) : integer | ||
Результат | integer | The number of launched workers |
protected launchWorkers ( string $address = null ) : integer | ||
$address | string | optional An address to override the service name |
Результат | integer | The number of launched workers |
public onResponse ( Scalr\System\Zmq\Cron\AbstractPayload $payload ) | ||
$payload | Scalr\System\Zmq\Cron\AbstractPayload |