It launches pool of workers
protected launchWorkers ( string $address = null ) : integer | ||
$address | string | optional An address to override the service name |
return | integer | The number of launched workers |
/** * {@inheritdoc} * @see \Scalr\System\Zmq\Cron\AbstractTask::launchWorkers() */ protected function launchWorkers($address = null) { $config = $this->config(); //It launches different pools of workers according to replication schema defined in the config foreach (array_merge(!empty($config->replicate['type']) ? $config->replicate['type'] : [], ['all']) as $type) { if (!empty($config->replicate['account'])) { foreach ($config->replicate['account'] as $acc) { parent::launchWorkers($this->name . '.' . $type . '.' . $acc); } } parent::launchWorkers($this->name . '.' . $type . '.all'); } }