def call_on_commit(self, callback):
    if not self.in_transaction():
      callback()
    else:
      self._on_commit_queue.append(callback)
Call a callback upon successful commit of a transaction.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ndb/context.py/Context.call_on_commit