/** * @throws Exception\RuntimeException * * @return mixed */ public function receiveMessageDirectly() { return $this->channel->receiveMessage(); }
/** * @param ChannelInterface $channel * @param WorkerStatus $result * * @throws Exception\RuntimeException */ public static function sendStatusMessage(ChannelInterface $channel, WorkerStatus $result) { $channel->sendMessage($channel instanceof SerializedChannel ? $result : ['_status_' => $result->toArray()]); }