/** * {@inheritdoc} * * @param WorkerInterface $worker * @return bool */ public function attach(WorkerInterface $worker) { if (count($this->workers) === $this->configuration->getProcesses()) { return false; } $this->workers->attach($worker); if (!$worker->isStarted()) { $worker->start(); } $this->broker->addMessage(new TestMessage($worker->getOutputStream())); return true; }