while more:
    model_dbs, more_cursor, more = Model.query().fetch_page(limit,
        start_cursor=more_cursor)
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'
self.response.out.write('The task has been started!')
Обновление большого количества сущностей в хранилище данных в Google App Engine