for model_db in model_dbs:
    model_db.updated = True
ndb.put_multi(model_dbs)
logging.info('### %d entities were updated' % len(model_dbs))


class UpdateModelHandler(webapp2.RequestHandler):

    def get(self):
        deferred.defer(update_model, _queue='queue')
self.response.headers['Content-Type'] = 'text/html'
Updating a large number of entities in a datastore on Google App Engine