我正在使用节点 @aws-sdk/client-timestream-query 3.53.0 包。我遇到了一个问题,ProgressPercentage 的结果不是 100,而是返回了承诺。
const promise = this.client
.send(command)
.then((data) => parse(data))
.catch((err) => err);
this.cache.set('accountPlatforms', promise);
return (await this.cache.get('accountPlatforms')) || []
然后不一致地,我们会从 Promise 中得到像这样返回的结果。
{
"$metadata": {
"attempts": 1,
"httpStatusCode": 200,
"requestId": "redacted",
"totalRetryDelay": 0
},
"ColumnInfo": [
{
"Name": "platform",
"Type": [
null
]
},
{
"Name": "success",
"Type": [
null
]
},
{
"Name": "failure",
"Type": [
null
]
},
{
"Name": "total",
"Type": [
null
]
}
],
"NextToken": "redacted",
"QueryId": "redacted",
"QueryStatus": {
"CumulativeBytesMetered": 10000000,
"CumulativeBytesScanned": 108896,
"ProgressPercentage": 67.63129689174706
},
"Rows": [
]
}
我看不到通过 requestId 或 queryId 从我们的服务内部查找已完成查询的方法。
有人知道如何获得完整的查询吗?