def check_transaction(self, app_id, txid):
    logging.debug("Checking transaction for app {0}, transaction id {1}".format(
      app_id, txid))

    if self.needs_connection or not self.handle.connected:
      self.reestablish_connection()

    txpath = self.get_transaction_path(app_id, txid)
    try:
      if self.is_blacklisted(app_id, txid):
        raise ZKTransactionException("Transaction {0} timed out.".format(txid))
    except ZKInternalException as zk_exception:
      logging.exception(zk_exception)
      self.reestablish_connection()
      raise ZKTransactionException("Couldn't see if transaction {0} is valid" \
        .format(txid))

    try:
      if not self.run_with_retry(self.handle.exists, txpath):
        logging.debug("[check_transaction] {0} does not exist".format(txpath))
        raise ZKTransactionException("Transaction {0} is not valid." \
          .format(txid))
      return True
    except kazoo.exceptions.KazooException as kazoo_exception:
      logging.exception(kazoo_exception)
      self.reestablish_connection()
      raise ZKTransactionException("Couldn't see if transaction {0} is valid" \
        .format(txid))
Execute a query.
dataset/ETHPy150Open AppScale/appscale/AppDB/zkappscale/zktransaction.py/ZKTransaction.check_transaction--crossover with--dataset/ETHPy150Open google/encrypted-bigquery-client/src/ebq.py/_Query.RunWithArgs