コード例 #1
0
ファイル: SharedWorker.php プロジェクト: exsyst/worker
 /**
  * @throws Exception\RuntimeException
  *
  * @return mixed
  */
 public function receiveMessageDirectly()
 {
     return $this->channel->receiveMessage();
 }
コード例 #2
0
ファイル: AdminEncoding.php プロジェクト: exsyst/worker
 /**
  * @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()]);
 }