dispatcher->dispatch(new BeforeWorkerStart($server, $workerId)); if ($workerId === 0) { $this->dispatcher->dispatch(new MainWorkerStart($server, $workerId)); } else { $this->dispatcher->dispatch(new OtherWorkerStart($server, $workerId)); } if ($server->taskworker) { $this->logger->info("TaskWorker#{$workerId} started."); } else { $this->logger->info("Worker#{$workerId} started."); } $this->dispatcher->dispatch(new AfterWorkerStart($server, $workerId)); CoordinatorManager::until(Constants::WORKER_START)->resume(); } }