await storage.run({ action: "usage" });storage.run(action="usage")为何在写之前问
计划空间的写作被拒绝 quota_exceeded读和删除工作持续进行——不对称是故意的,所以你总是可以获取数据,腾出空间——但一个在批量中途失败的写作,将让你去研究落地的东西。
const before = await storage.run({ action: "usage" });
// Write in batches, and stop on the first refusal rather than pushing through
for (const batch of batches) {
try {
await storage.run({ action: "insert", collection, documents: JSON.stringify(batch) });
} catch (err) {
if (err.code === "quota_exceeded") break;
throw err;
}
}import json
from iagenify import IaGenifyError
before = storage.run(action="usage")
# Write in batches, and stop on the first refusal rather than pushing through
for batch in batches:
try:
storage.run(action="insert", collection=collection, documents=json.dumps(batch))
except IaGenifyError as error:
if error.code == "quota_exceeded":
break
raise此存储或账户
| 问题问题(问题) 问题 | 询问询问 |
|---|---|
| 这个有多满? | 运行( { 动作: “ 使用 ” ) } |
| 该计划在服务方面提供了什么? | api.cloud.usage() |
| 哪个文件占用空间? | api.files.list(),并按大小排序 |
账户一级的观点 告诉你购买空间是否有用, 因为那是计划 的津贴生命。