这是一段简化的代码片段:
ndb_query_iter = ndbObject.query().iter(keys_only=True)
has_next = ndb_query_iter.has_next()
if has_next:
while has_next:
deferred.defer(doStuff, ndb_query_iter.next())
has_next = ndb_query_iter.has_next()
我收到以下错误消息:
BadRequestError: invalid handle: <various ndb-id>
问题在于最后一行代码:
has_next = ndb_query_iter.has_next()