Python 当客户端请求数据时,为什么simple aql execute返回AsyncJobResultError?
简单aql execute查询经常返回此错误Python 当客户端请求数据时,为什么simple aql execute返回AsyncJobResultError?,python,asynchronous,arangodb,fastapi,python-arango,Python,Asynchronous,Arangodb,Fastapi,Python Arango,简单aql execute查询经常返回此错误 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
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]
您是否尝试关闭返回{..statement中的方括号是的,这不是问题,因为它只是一个示例。实际查询给出的结果很好,但在客户端多次请求时失败。我认为如果请求太频繁,异步作业仍然未完成,然后抛出此错误。