def ping(self, reconnect=False):
    self.CheckOpen()
    request = sql_pb2.ExecOpRequest()
    request.op.type = client_pb2.OpProto.PING
    try:
      self.MakeRequest('ExecOp', request)
    except DatabaseError:
      if not reconnect:
        raise


      self._connection_id = None
      self.OpenConnection()
Checks whether or not the connection to the server is working.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/storage/speckle/python/api/rdbms.py/Connection.ping