Пример #1
0
 def load_data_block(self, count, block_id):
     msg = tws_pb.LoadDataBlockRequest(count=count, block_id=block_id)
     logging.debug("sending DataBlock with id %s", block_id)
     stat = self._rpc_with_retry(
         lambda: self._client.LoadDataBlock(msg),
         "Failed to send load data block request")
     return stat.code == common_pb.STATUS_SUCCESS
Пример #2
0
 def load_data_block(self, count, block_id):
     msg = tws_pb.LoadDataBlockRequest(count=count, block_id=block_id)
     logging.debug("sending DataBlock with id %s", block_id)
     stat = self._rpc_with_retry(lambda: self._client.LoadDataBlock(msg),
                                 "Failed to send load data block request")
     if stat.code == common_pb.STATUS_SUCCESS:
         logging.info('Remote succeeded to load data block %s', block_id)
         return True
     logging.info('Remoted failed to load data block %s. code: %d',
                  block_id, stat.code)
     return False
Пример #3
0
 def load_data_block(self, count, block_id):
     req = tws2_pb.LoadDataBlockRequest(count=count, block_id=block_id)
     logging.debug("[Bridge] sending DataBlock with id %s", block_id)
     resp = self._client.LoadDataBlock(req)
     if resp.status.code == common_pb.STATUS_SUCCESS:
         logging.info('[Bridge] remote succeeded to load data block %s',
                      block_id)
         return True
     logging.info('[Bridge] remoted failed to load data block %s. code: %d',
                  block_id, resp.status.code)
     return False
Пример #4
0
 def load_data_block(self, count, block_id):
     msg = tws_pb.LoadDataBlockRequest(count=count, block_id=block_id)
     logging.debug("sending DataBlock with id %s", block_id)
     return self._client.LoadDataBlock(msg)
Пример #5
0
 def load_data_block(self, count, block_id):
     msg = tws_pb.LoadDataBlockRequest(count=count, block_id=block_id)
     return self._client.LoadDataBlock(msg)