/** * Retrieve what is broadcasting. * * @return RunningBroadcast[] */ protected function updateRunningBroadcasts() { $this->runningBroadcasts = array(); $this->logger->debug('Retrieve running broadcasts'); $processStrings = $this->schedulerCommands->getRunningProcesses(); foreach ($processStrings as $processString) { $runningItem = new RunningBroadcast($this->schedulerCommands->getBroadcastId($processString), $this->schedulerCommands->getProcessId($processString), $this->schedulerCommands->getChannelId($processString), $this->schedulerCommands->getEnvironment($processString), $this->schedulerCommands->isMonitorStream($processString)); if ($runningItem->isValid($this->schedulerCommands->getKernelEnvironment())) { $this->runningBroadcasts[] = $runningItem; } } return $this->runningBroadcasts; }
/** * @param string $processString * @return RunningBroadcast */ protected function createRunningProcess($processString) { return new RunningBroadcast($this->commands->getBroadcastId($processString), $this->commands->getProcessId($processString), $this->commands->getChannelId($processString), $this->commands->getEnvironment($processString), $this->commands->isMonitorStream($processString)); }