def _migrate_users(curs=None):
    users, next_curs, more = User.query().fetch_page(50, start_cursor=curs)
for user in users:
    user.field1 = 'bla bla'
ndb.put_multi(users)
if more:
    deferred.defer(_migrate_users, next_curs, _queue='default')
Update for big count of NDB Entities fails