简单的 aql 执行查询过于频繁地返回此错误。
arango.exceptions.AsyncJobResultError: [HTTP 204] job 4739915 not done
有时它会返回数据,有时它不会在抛出错误时返回。
示例查询如下。
# here db is an instance of AsyncDatabase of python-arango library
# which is retreived by arangoClient.begin_async_execution
cursor = db.aql.execute(f"""
LET test = (
FOR c IN TestCol
FILTER c.status == @status
COLLECT WITH COUNT INTO length
RETURN length
)
return {{
"test": test[0],
"status": SomeStatus
}}
""").results()
# to consume cursor
res = [x for x in cursor]