Exemplo n.º 1
0
  def auth_db_transaction(self, callback):
    """Imitates AuthDB change and subsequent 'process-change' task.

    Returns parent entity of entity subgroup with all generated changes.
    """
    @ndb.transactional
    def run():
      callback()
      return model.replicate_auth_db()
    auth_db_rev = run()
    change_log.process_change(auth_db_rev)
    return change_log.change_log_revision_key(auth_db_rev)
Exemplo n.º 2
0
  def auth_db_transaction(self, callback):
    """Imitates AuthDB change and subsequent 'process-change' task.

    Returns parent entity of entity subgroup with all generated changes.
    """
    @ndb.transactional
    def run():
      callback()
      return model.replicate_auth_db()
    auth_db_rev = run()
    change_log.process_change(auth_db_rev)
    return change_log.change_log_revision_key(auth_db_rev)