コード例 #1
0
 /**
  * {@inheritdoc}
  */
 protected function executePipeline(ConnectionInterface $connection, \SplQueue $commands)
 {
     while (!$commands->isEmpty()) {
         $connection->writeRequest($commands->dequeue());
     }
     $connection->disconnect();
     return array();
 }
コード例 #2
0
ファイル: Pipeline.php プロジェクト: peterxiemin/commonswoole
 /**
  * Throws an exception on -ERR responses returned by Redis.
  *
  * @param ConnectionInterface    $connection Redis connection that returned the error.
  * @param ErrorResponseInterface $response   Instance of the error response.
  *
  * @throws ServerException
  */
 protected function exception(ConnectionInterface $connection, ErrorResponseInterface $response)
 {
     $connection->disconnect();
     $message = $response->getMessage();
     throw new ServerException($message);
 }