title: Google Cloud Datastore - transaction
body: <p>I have a procedure run on a cron schedule which has equivalently the following steps as part of a google cloud app.
      #clear Kind1
      for p in model.Kind1.query():
        p.key.delete()</p>
  
  <pre><code>#repopulate Kind1 with date from Kind2
  for p1 in model.Kind2.query():
    a = new Kind1()
    a.key = p1.key
    model.Kind1.put(a)
  </code></pre>
  
  <p>As you read you see Kind1 is temporarily blank.</p>
  
  <p>Is there a built in way inside of Google Datastore (or another part of the environment) to create a transaction from this procedure to create a form of lock? I am concerned the procedure as written can create unavailability for a period of time.  </p>
  
  <p>Another thought to find the sources using Kind1 and create a cache that is invalidated upon completion of the above procedure.</p>
  
  <p>Are there any other recommendations for how to handle this?</p>